Delete Unused Images
Why should I delete unused images?
Unused images take up your time and money. They clutter up your WordPress Media Library so that you and any other author need more time to navigate it. Unused images also occupy disk space, increasing your hosting bill and causing longer backup times.
Removing unused images made easy!
✔ Find all images not associated with any content.
✔ Identify images uploaded to posts that are no longer used.
✔ Perform a deep–check in options and metadata
✔ Safely delete unused images in bulk
Why do unused images exist?
Whether you just write an article or update an existing one, images sometimes need updates, too. It is quick and easy to remove images from the post editor and so often forgotten to remove them for good.
Multiple authors create posts
Your team is busy creating and updating a lot of content. While you might allow authors to add images to posts, they might not have sufficient rights to remove old images. They might not even know how to properly check – which often needs developer skills anyway.
Updating your website
You created a lot of test content and elements for your new project. Maybe, you changed the theme a couple of times and tested many plugins. All this created digital waste, which you might want to remove before the changes go live.
Did you know? For every image you upload, WordPress stores it in multiple sizes. It only displays the appropriate size on smaller devices, which is great for the performance of your website. But this also means that each image in your media library is, in fact, multiple images, taking up a lot more disk space.
Why you should remove old images
✔ Lower server bills. Images are among the most disk-eating resources, with a single picture often taking up 3 MB or more. This quickly sums up and fills the available space.
✔ Smaller and faster backups. Regular updates with old data quickly multiply the space needed for them.
✔ Lower chance of hitting a server file limit, which is very common for many hosting companies, even if they don’t share this publically.
✔ Easier navigation in the media library since there is less clutter and distraction. You quicker find up-to-date images and reuse them rather then picking orphaned ones.
Delete unused images with Image Source Control
✔ List all unused images in one place
✔ Check images in content, options, and metadata
✔ Delete unused images in bulk
✔ Calculate resources blocked by unused images
✔ Stores Deep Check results for later review
✔ Filter the list for unchecked and unused images
Why you need a WordPress plugin to remove unused images
WordPress does not keep track of where an image is used. It only stores to which post an image was originally uploaded to, but not, if it is still used within that post. The “Uploaded to” information is unreliable.
The only way to remove unused images from the media library without a plugin is by using SQL queries. Just writing and testing these queries will take experienced developers several hours because they need to look for image URLs in various formats and image IDs, distinguish between image IDs that are random numbers or array keys, look for information in options and metadata, and consider any plugin you ever used and how they stored their information.
This query then needs to run for every probably unused image in the media library.
Remove unused images with the WordPress plugin Image Source Control — even if you aren’t a developer!
Yes. Just mark all relevant images, or simply all images on the page with one click, and then choose your appropriate action from the bulk options.
Image Source Control checks if an image is used as a featured image, the actual usage within the content of posts and pages, post meta, and options. It searches for the image URL and attachment ID.
WordPress doesn’t have a Trash for deleted unused images. Therefore, we show a confirmation message before deleting anything, and this never happens automatically, either. If you accidentally delete unused images, then use a recent backup. Ask your hosting provider if you don’t have a recent one.