ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

expressionengine image not deleted from server after entry is deleted

December 22, 2011 12:21am

Subscribe [4]
  • #1 / Dec 22, 2011 12:21am

    alex00

    35 posts

    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.
    I’m using 2.3.1

  • #2 / Dec 22, 2011 1:26am

    ahmad saad

    364 posts

  • #3 / Dec 22, 2011 1:47am

    alex00

    35 posts

    This seems very awkward. I have users create and edit entries with images.  Images associated with there entries should be deleted when an entry is deleted. Manually deleting the images is not practical and not very possible. Admin have no way of knowing what images belongs to deleted entries. I hope this is a bug because it makes sense for this to be a default behavior. Unused images an quickly built up when editing entry images or deleting entries.

  • #4 / Dec 22, 2011 7:39am

    Boyink!

    5011 posts

    Once the images are on the server they are available for use in any entry in EE, and EE doesn’t track which images are used in which entries.  Deleting the image when one entry is deleted means other entries using that same image would “break”.

    I wouldn’t say it’s a bug, you could make a feature request but honestly it feels like the amount of work the CMS would have to do for the gains would be prohibitive.

  • #5 / Dec 22, 2011 11:56am

    Kurt Deutscher

    827 posts

    Hi Alex,

    We have a site with this same challenge, its a lost and found pet database and each pet’s listing can have an image. We did two things to help cut down on the number of images collected.

    http://www.dovelewis.org/lost-and-found-pets/

    One is that all listings auto-expire off the site after 6 months. We have a date conditional in a weblog/channel tag that prevents entries older than 6 months from displaying or being included in searching of the database.

    The second is that we add an image upload date to all image file names. This way, we can go into that folder once or twice a year and delete all images with upload dates older than 6 months, and that helps keep our images folder a little leaner.

    It would be great if we had the option of having some files (like these images) be removed from the server when an entry is removed and would make our life easier when it comes to keeping our image folder on the server a little smaller. Now that all images are assigned an ID number with the new file manager in EE, it should be possible for to do this.

    I would recommend you create a feature request and site this thread in the request.

  • #6 / Dec 23, 2011 3:46am

    John Henry Donovan

    12339 posts

    Hi Alex,

    All great advice and the Feature I would request is to maybe have a checkbox for ‘Permanently delete associated files or image from Server’ or similar when deleting an entry or a custom field image

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases