You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like it should be a logical default to hook into Elements::EVENT_AFTER_DELETE_ELEMENT (and check for the Asset entry type) and erase the cached image, just like what happens when Assets::EVENT_AFTER_REPLACE_ASSET fires.
The text was updated successfully, but these errors were encountered:
The reason the transforms are cleared (from the system path/cache) when replacing assets, is because new transforms for the new image wouldn't otherwise be created, since the filename is the same.
That issue is not relevant when deleting. But what I guess you allude to is that you expect Imager to deølete any transformed files if the original asset is deleted?
That was my reasoning indeed, the original ID would never be hit when the asset is deleted, so the folder should be removed with the contents to prevent a buildup of unused images.
It seems like it should be a logical default to hook into
Elements::EVENT_AFTER_DELETE_ELEMENT
(and check for the Asset entry type) and erase the cached image, just like what happens whenAssets::EVENT_AFTER_REPLACE_ASSET
fires.The text was updated successfully, but these errors were encountered: