delete unused image sizes
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.
Truly there should be an easy way to find and remove these images.
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?
I think there's a plugin that finds and delete these un needed images
This definitely should be a core feature.
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?
What if older posts are still using the images in those sizes? How would you scan for that?
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.
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.
RSS feed for this topic
You must log in to post.