Skip to content

Choose which cookie categories to allow.

CICO Media
Find image usage

How to Find Unused Images in WordPress Without Deleting Anything

A safe way to build a shortlist of unused images in WordPress: what the manual methods miss, how to check each candidate, and why you should never delete from a filter alone.

By CICO Media3 min read

On this page

Cleaning up a large Media Library is tempting: fewer files, a lighter backup, less clutter. The risk is deleting an image that a page still needs. This guide shows a way to find candidates without deleting anything, so the final decision is yours and it is based on evidence.

Why “unused” is hard to answer in WordPress

WordPress records where an image was uploaded (the Uploaded to column), not where it is used. An image can look unattached and still sit on your homepage, and an attached image can be long gone from the page it was uploaded to. The difference is explained in Unattached vs Unused Media in WordPress.

On top of that, images can be referenced from many places: post content, featured images, builder layouts, custom fields, widgets, theme settings, menus and custom code. A single check rarely covers all of them.

A safe process in five steps

  1. Take a backup of the database and of the uploads folder. If you can, test the clean-up on a staging copy first.

  2. Enable the media trash, so deleted files can be recovered. Add this line to wp-config.php:

    define( 'MEDIA_TRASH', true );
  3. Build a shortlist. Start from the Unattached filter, or from a usage filter if you have a tool that provides one. Treat the result as candidates, nothing more.

  4. Check every candidate. Use the methods in How to Find Where an Image Is Used in WordPress: search the content, look at the builder, custom fields and widgets, and check the database when needed.

  5. Delete in small batches. After each batch, visit the most important pages and the ones that use many images.

Referenced is not the same as visible

An image can be referenced by a draft, a private page or a hidden block and still not appear to visitors. Before you decide, it helps to know whether a reference is live or not. That is the topic of Used vs Visible: Why a Referenced WordPress Image May Not Be Live.

How CICO Media Pro shortens the shortlist

CICO Media Pro adds a usage index to the native Media Library. Each card shows Used · N or No usage found, and the Where used panel lists the places where an image was found, with the source and the frontend status.

The usage index runs in the background and shows Used · N or No usage found on every card.
The Where used panel lists the places where an image is used, with the source and the frontend status.

You can filter the library by usage and see the images with No usage found in one list, then open each one to check the details before you decide.

Filter by usage, tag, orientation, file size, file type and source.

Two things to keep in mind:

  • No usage found means nothing was found. It is not a promise that an image is safe to delete.
  • CICO never deletes for you. There is no automatic clean-up and no “delete all unused” button.

In the docs: how Usage Intelligence finds unused images, and how the Usage Index is built and rebuilt.

Summary

  • WordPress does not tell you which images are unused; you build a shortlist and verify it.
  • Back up, enable the media trash, check each candidate and delete in small batches.
  • A usage index makes the shortlist faster and better, but the decision stays with you.

Frequently asked questions

How do I find unused images in WordPress?

Build a shortlist first, then check every image on it. WordPress core does not list unused media. The Unattached filter is only a starting point, because it shows where an image was uploaded, not where it is used.

Is it safe to delete unused images?

Only after you have checked where each image is used, taken a backup and, ideally, enabled the media trash. Deleting from the Media Library is permanent by default.

Why does a plugin report an image as unused when it is on my site?

Images can be referenced by builders, custom fields, widgets, theme settings or custom code in ways a scan does not always see. Read an unused result as a hint to check, not as proof.

Does CICO Media delete unused images for me?

No. CICO Media shows usage information and context inside the native Media Library. It never deletes files automatically.

Get CICO Media Pro