WordPress.org

Ready to get started?Download WordPress

Ideas

delete unused image sizes

  1. Daniel
    Member

    After switching between themes, I've got image files that are no longer used (eg: penguins-60x60.jpg) hanging around in wp-content/uploads. It would be nice if there was an option in the media settings to delete all image files with a size that is no longer used. Then, backing up my site would take less time.

    Posted: 1 year ago #
  2. P. Chandra
    Member

    12345

    Truly there should be an easy way to find and remove these images.

    Posted: 1 year ago #
  3. Michael Cannon
    Member

    12345

    I run into this issue with having photos and changing themes every year or so. I would mind coding something.

    From what WP resources would you consider the valid sizes defined?

    Just the media screen or would you include add_image_size?

    Would you want to have a no delete period or basic find all, list'em, delete'em routine?

    Posted: 1 year ago #
  4. Pete
    Member

    I think there's a plugin that finds and delete these un needed images

    Posted: 8 months ago #
  5. Ipstenu (Mika Epstein)
    Administrator

    http://wordpress.org/plugins/cleanup-images/ looks like it does that.

    Posted: 7 months ago #
  6. Ellen Hopkins
    Member

    This definitely should be a core feature.

    Posted: 6 months ago #
  7. Ravi Kumar
    Member

    12345

    There are two thoughts right now in my mind.

    1. Show all the image(s) in media section for example penguins-60x60.jpg and penguins.jpg so user can delete or edit used/unused images.

    2. When we upload image(s) they should be categorized for example, sliders Image, Blog Image, User can select which image size(s) they need. So only image cropped with selected image sizes.

    What you guys think?

    Posted: 6 months ago #
  8. Ipstenu (Mika Epstein)
    Administrator

    What if older posts are still using the images in those sizes? How would you scan for that?

    Posted: 6 months ago #
  9. Michael Cannon
    Member

    12345

    @Ravi,

    1. If we allowed a view option in the library or edit listing, this could work. Displaying all images though would really wreck havoc on the display.

    2. On upload, it doesn't make sense to select needed because the system knows what it needs and makes them.

    We might look at this from a different perspective of cycling through all of the uploads and find those with sizes not matching any of the given sizing profiles. When found, offer to delete those.

    Posted: 6 months ago #
  10. Michael Cannon
    Member

    12345

    Definitely sounds like an Ajax good time for each media entry.

    1. Scan for existing images
    2. Scan for sizes not fitting current profiles
    3. Scan content and meta for usage
    4. Show listing of those not linked to for deletion

    Actually, in looking at it this way, this is a pretty easy plugin. Just soaks up time like crazy. Easily could be an hour or two to process for larger sites.

    Posted: 6 months ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    12345
    22 Votes
  • Status

    This idea is under consideration