Search code examples
expressionengine

expressionengine image not deleted from server after entry is deleted


I have a SafeCracker File for as a fieldtype for my channel entries. Everything works fine and i'm able to upload images along with the entry. In EE control panel, if i edit the entry and delete the image or even if i delete the whole entry, the images associated with this entry is are not deleted from the server. Why is this happening. is this a known issue.


Solution

  • This isn't a bug; it's how ExpressionEngine handles file assets. When you delete an image from an entry, EE deletes the relationship between the image and the entry. The image will continue to exist on the server until you delete the image itself. To do this, navigate to EE's file manager and delete the image there.

    The reason EE behaves this way is because it allows you to easily link to an image or file from multiple entries in the system. If you had multiple entries linking to an image and were able to delete it from one of those entries, you would break the relationship to it from all of the other pages that referenced it.