Delete Unused Images and Clean up Disk Space in WordPress

As a WP Staging user, you know the importance of backups and enjoy the quick creation of test sites before installing updates, themes, and plugins.

Maybe, you have already notices, that some of your backups and test sites, take longer to copy than others. In addition to the speed of your hosting and internet connection, there are a couple of avoidable reasons why backups take longer.

  • Outdated database entries and tables,
  • Disabled plugins and their data,
  • Plenty of unused images.

In this article, I am addressing the biggest of these issue in terms of disk space: unused images and how to delete them safely using the Image Source Control plugin.

Delete Unused Images

Why to Delete Unused Images

Did you know, that WordPress generates multiple image files from each image you upload into a post and the media library?

While this helps speed up your website’s frontend, it multiplies the demands on your server and database space.

This normally default behavior becomes an issue when many of the uploaded images are not used because the author or editor decided otherwise, or a later cleanup or rewriting of posts removes certain images.

Over time, problems increase:

  • Limited disk sSpace: More files = higher hosting costs and risk of hitting storage limits.
  • Slow backups: Extra files prolong backup times and increase server load during backup windows.
  • Degraded performance: A bloated media library can lag the admin interface, frustrating your workflow.

How can WordPress delete unused images?

You might think that deleting unused images in WordPress is an easy fix, since the media library shows you some posts in the “Uploaded to” column. Unfortunately, this information is useless for our purpose.

The “Uploaded to” column is just that: it lists the single post into which an image was originally uploaded. No post shows up here, if you uploaded the images into the media library before adding it to the content. The information is also not updated if the image was removed from or is used in another post.

I have never seen a website that could safely delete unused images without any of these issues. The only viable solution is a dedicated WordPress plugin like Image Source Control (ISC).

Delete Unused Images with Image Source Control

Image Source Control extends the WordPress dashboard with a dedicated page to delete unused images, allowing you to remove such images safely.

  • Comprehensive scans: ISC checks front-end content, post meta, options, and page-builder modules to find unused images.
  • Appearance tracking: Your media library is extended with the ”Appearances” column, showing you where each image is used.
  • Bulk actions: Delete dozens or hundreds of images in one click.
  • Attribution management: Bonus features help you manage copyright data across your library.

The plugin exists since 2012 and receives regular improvements and updates to work with the large ecosystem of WordPress plugins.

Learn more at imagesourcecontrol.com.

Step-by-Step: Deleting Unused Images

  1. Get Image Source Control
  2. Install the plugin on your main site
  3. Enable the Unused Images module under Settings > Image Sources
  4. Run the ISC Indexer
    • Navigate to Media > Unused Images.
    • Click Run Indexer to scan public content and register all active image references.
  5. Perform a Deep Check
    • Navigate to Media > Unused Images
    • Run the Deep Check on any remaining images to check their use in options and meta data. Bulk-select images if you wish.
  6. Delete Unused Images Safely
    • Review the remaining images and choose Delete Permanently on those that are not used anymore.

From now on, your backups and staging sites are created much faster, while still keeping relevant media files.

Finding unused images with the Image Source Control indexer

Beyond Deletion: Ongoing Media Management

Maintaining a streamlined media library involves more than a one-time cleanup. Consider these best practices:

  • Monthly audits: Depending on your content activity, schedule a quick ISC scan on your staging site every 30 days or once a quarter.
  • Pre-upload pptimization: Compress images locally before uploading with tools like TinyPNG.
  • Descriptive file names: Use clear names (e.g., how-to-delete-unused-images.png) to identify image content when not seeing a preview of them on your server.

Conclusion

Combining WP Staging backup and staging site features with the precision of Image Source Control to delete unused images, will reclaiming valuable resources and time.

Ready to streamline your WordPress media? Check out the dedicated feature description at Image Source Control: Delete Unused Images.