[Asset manager] Apps getting fatter after adding then removing images to and from the Asset Manager

The problem is relatively simple. Any asset added to the manager and then used within the app will not be removed from the app container upon deletion of the app assets.
History rollback must be applied to achieve this goal.
This is not documented and may lead to unnecessary increases of app sizes both in composer and as a build target.

Is there any solution to remove orphaned asset manager assets from the app’s container ?
Thank you


Here go the reproduction steps:

Open en existing app in composer;
Export the app as a file and write down its size;

Reopen the app in composer
Add a an image to the Asset Manager.
Bind the image with a variable and save and build the app.
Export the app and write down its size. The size increase should reflect the size of the added asset.

Reopen the app in composer
Remove the variable and save the app
Remove the asset from the manager as well (not a necessary step)
Export the app as a file. You will notice the size of the app’s file did not decrease!

Goto app history and apply the history rollback over the past few actions.
Save the app and export it as a file.
You will notice the size of a file is back to the initial size before you create a variable and bound an image to it.