Unused Media Scanner

The Simplest Way to Delete Unused Media from WordPress

In its generic form, the WordPress Media Library is a single folder where you can upload any type of content file.

It can (and should) be organised by adding a categorisation plugin, so files can be grouped as needed, however, over time unused uploads amass and sit on the server, taking up hosting space.

The problem is more noticeable if you re-design websites for clients, or take-on WordPress sites developed elsewhere. There’s always a collection of unused media littered throughout the Media Libary.

Most of them are images, because WordPress creates duplicates each time an image is uploaded, that are not used.

We needed a simple and fast way of cleaning that out, so we built one.

What does the Unused Media Scanner do?

The Unused Media Scanner WordPress Plugin scans your WordPress Media Library and highlight all the assets that are not currently being used.

Then select which ones you wish to remove by ticking them and deleting them.

Why use Unused Media Scanner on your site?

  • Firstly, this is a problem that there wasn’t a simple fix for, until now.
  • There are similar features baked into other plugins, but they are bloated with features we don’t need and wouldn’t use. Right now, we don’t believe there’s anything as streamlined and efficient as this.
  • It’s lightweight by design because PageSpeed is a omnipresent consideration, so we made it, and will continue to ensure it remains as bloat-free and lightweight as possible
  • We developed it as an internal tool for 1WL Agency’s Web Development & Content teams, because we needed this functionality and could not find it! Using someone else’s plugin would have been SOOO much easier than building it ourselves!
  • This is something we use regularly on all the sites we support and develop, so wanted to share this with the WordPress Community and hope others find it equally useful.
  • The current version is FREE to use and always will be.

What is the future development path for Unused Media Scanner?

Our plan is to add additional functionality as we find new requirements that align/compliment the existing functionality. We don’t have anything confirmed yet but when we do, we will update this page with the details of any new features.

We are also open to suggestions for any features you might like to see. Contact Us if you have any.


= 0.1.1 =

– Added localisation, in order to support additional languages in future. Currently just exists in English
– Added a link to a Help page
– Updated the design of the image results to feel more like the Media Library
– Separated Unused Image Scanner results into individual tabs for Unused Images and Used Images

Disclaimer and recommendation:

As with all plugins, the safest way to use them is to test them on a non-live copy of the website before using them on a Live site, and in addition, make a complete backup of both your WordPress database and all Website Files, before you begin (in case you delete something you later find you needed).

Use of this plugin is done so entirely at your own risk. As the plugin developer, we do not accept any responsibility for your use of the plugin, or any loss of assets that might arise from using it. 

Follow the recommendations, always have a backup, and you’ll always be fine.

How to use Unused Media Scanner:

1) Install the plugin, then find the Unused Media Scanner in the Tools menu. Click on it.

2) Click the “Run library scan” button on the Scanner tab and wait for the list of results.

3) To remove images, click one or more checkboxes and click “Delete selected”.

4) Wait until a confirmation alert box appears before closing your browser tab/window or navigating away.

Once complete, check your website thoroughly to ensure everything functions as it should.

The Results page explained

As shown above in Step 3 above, the results of a scan are split across 2 tabs for Unused Results and Used Results, with a slight difference to the information between them.

Both results tabs show the following generic information:

  • ID – The unique database ID for the media file
  • URL – The URL path to the image or file (append this to your domain name to view the file in your browser)
  • URL Bare – This is the unique slug assigned to the file, by WordPress.


The Used Results (below) also contains a ‘References’ table containing the following additional information:

  • ID – The unique database ID for the Page or Page Revision
  • Type – Whether the file is currently being used in a Page, or in a past Revision of a page.
  • Title – This is the title of the page or revision.
  • Edit – This is a link to Edit the page or View the revision of the page, where the file is in use.

NOTE: When a file is in use on more than one page, each of those pages and all their revisions will appear in the list.