Description
Every media library grows. Sooner or later you look at an image and ask the question WordPress cannot answer: is this still used anywhere?
Core shows you “Uploaded to” — the post an image happened to be attached to, which says nothing about where it actually appears. Image Locator answers the real question:
- A Usage column in the media list: used in how many places, unused, or not checked yet — with the first findings in the tooltip.
- A “Used in” panel on every image (list view and grid modal): each post, page, widget or setting that references the image, linked for one-click editing.
- A usage page per image: the image on one side, every place it is used on the other — each opening in a new tab for editing. Checked live on every visit, with a delete button that warns you properly if the image is in use.
- A filter: show only used, unused or unchecked images.
- A library scan that works through everything in small time-budgeted batches — it cannot time out, even on large libraries.
- A bulk action to delete unused images — see below for why it is the careful kind.
Where it looks
The scan searches the database, not just the post content:
- Post content: image blocks, classic editor markup, galleries — matched by attachment ID and by every size variant of the file name
- Featured images
- Custom fields and page-builder data (Elementor, Divi, WPBakery and others store image references in post meta as IDs or URLs — both are searched)
- Widgets, the site logo, the site icon
- Term images, including WooCommerce category images
Drafts count as usage — those are exactly the ones you want to know about before deleting. Revisions and trashed items do not count.
Deleting, done carefully
“Unused” from a cached scan is not enough to delete a file. The bulk action “Delete unused (verified)” re-checks every selected image live, immediately before deletion. If an image turns out to be in use after all — because content changed since the scan — it is skipped and reported, not deleted.
And if you try to delete an image the scan knows is used, the media list warns you first, with the number of places it appears.
Deletion is permanent and removes the actual files, like WordPress’ own delete. Keep backups.
Honest about the limits
A database scan cannot see everything. Images hard-coded in theme or plugin template files, images referenced from custom CSS, and use on other websites are invisible to any plugin of this kind. Treat “unused” as strong evidence, not as a court ruling — that is exactly why the bulk delete re-checks each image, and why nothing is ever deleted automatically.
Disclaimer
This plugin is a tool, not a promise. It reads your database and reports what it finds; it cannot see images hard-coded in theme or plugin template files, referenced from custom CSS, or used on other websites. Deleting images is always your decision and your responsibility: every deletion is started by you, confirmed by you, and permanent — the files are removed. Verify the findings before you delete (the usage page exists exactly for that) and keep backups. The author accepts no liability for deleted images, broken layouts or any other consequences of using this plugin.
Performance
The media list never scans on render — the column reads only cached results. Scanning happens when you ask for it: per image with one click, or for the whole library in batches with a strict time budget per request. When content changes, existing results are marked as outdated instead of silently lying to you.
One honest trade-off: a full library scan takes time on large libraries. Every image is checked individually, with the same logic that runs before any deletion — one truth, one code path. On a library with thousands of images that can take a while; on a typical site it is a few minutes, and it is a one-time cost — after the first full run, “Check new images” only looks at new uploads. To really catch everything, thoroughness beats speed. The front end of your site is never touched either way.
Screenshots




Installation
- Upload the
seonai-image-locatorfolder to/wp-content/plugins/, or install it through the plugin installer. - Activate the plugin.
- Go to Media Image Locator and run the library scan.
- Check the new Usage column in the media list (list view), or open any image to see where it is used.
FAQ
-
Does it work with page builders?
-
Yes, within honest limits. Builders like Elementor, Divi and WPBakery store image references in post meta — as attachment IDs, as file URLs, or both. The scan searches post meta for the ID patterns and for every file name variant of the image. Exotic storage formats a builder might invent can escape any scanner; the live re-check before deletion is the safety net.
-
Why does an image show “outdated”?
-
Something on the site changed since that image was last checked — any saved post or updated widget triggers it, for all images at once. It is not a statement about this particular image: if you have not placed the image anywhere since, the result still stands, and unused is still unused. Re-check the image or re-run the library scan to make it fresh. Bulk deletion never relies on outdated results anyway — every image is re-checked live right before deletion.
-
The library scan takes a long time.
-
That is thoroughness, not a hang — the progress counter shows the current run moving. Every image is checked individually against content, custom fields, page-builder data, widgets and term images, using the same logic that runs before any deletion. Large libraries with thousands of images take correspondingly long; to really catch everything, that time is the price. Keep the tab open — the scan works in small batches and cannot time out. It is a one-time cost: after the first full run, “Check new images” only scans new uploads.
-
Does it slow down my site?
-
No. Everything runs in the admin, and the media list reads only cached values. The visitor-facing site is never touched.
-
Does it delete anything automatically?
-
Never. Deletion happens only when you select images and run the bulk action yourself — and even then, every image is re-checked live first.
-
Is “unused” guaranteed?
-
No plugin can guarantee that, and you should distrust any that claims to. Hard-coded template references and external use are invisible to a database scan. That is why deletion is manual, warned, and re-checked.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“SEO'n'AI – Image Locator & Find Unused Images” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “SEO'n'AI – Image Locator & Find Unused Images” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.12
- Plugin Check: added the missing translators comments for the two delete-confirmation strings, and fixed the placement of a PHPCS annotation so the prepared-SQL check in the options scan is correctly documented. No functional changes.
1.0.11
- Text domain and plugin folder now match the assigned wordpress.org slug (seonai-image-locator-find-unused-images).
1.0.10
- Fixed: files that WordPress stores with an image/* mime type but that are not checkable images (SVG, ICO) were counted as “unused” without ever being checked. They are now excluded from the scan, the statistics and the unused count, and leftover results from earlier runs are cleaned up automatically.
1.0.9
- Code review round: all SQL restructured so that queries with a variable number of IN()/LIKE placeholders are built explicitly and annotated; every value is bound through $wpdb->prepare(). The remaining literal queries (uninstall, statistics) now use prepare() as well.
1.0.8
- Screenshots reduced to four; the bulk-result screenshot was dropped (the live re-check before deletion is described in the text instead).
1.0.7
- Documentation: the scan’s thoroughness-over-speed trade-off is now stated openly — on the tools page, in the description and as an FAQ. Large libraries take time because every image is checked individually, with the same logic that runs before any deletion; catching everything is the point.
1.0.6
- Fixed: “Re-check everything” looked stuck — the progress showed the all-time checked count (100% from the start) instead of this run’s progress. It now counts the current run.
- Fixed: results were marked “outdated” far too eagerly. Revisions, autosaves and technical post types that never reference images (WooCommerce orders, scheduler actions) no longer trigger the outdated marker — on shop sites, everything used to look permanently outdated.
- Those technical post types are now also excluded from the scan itself.
1.0.5
- New: a Disclaimer section in the description — the plugin reports, the user decides; deletion is the user’s responsibility, and the author accepts no liability for deleted images.
- New: the bulk action now asks for confirmation before running, stating how many images are selected and that the final check is the user’s.
- The single-image delete confirmation on the usage page now says so too.
1.0.4
- Renamed to “SEO’n’AI – Image Locator & Find Unused Images” — the name now says both halves of what it does.
1.0.3
- New: a usage page per image — the image next to the list of every place it is used, each opening in a new tab for editing. Reached from the usage badge in the media list and from the image panel.
- The usage page always checks live, never the cache, so it never shows “outdated”.
- New: a delete button on the usage page, with a confirmation that states the live usage count — and a serious warning if the image is in use.
1.0.2
- Clearer wording everywhere “outdated” appears: it means something on the site changed since the check — not that this image’s result is wrong. If the image was not placed anywhere since, unused is still unused. Explained in the column tooltip, on the image panel and on the tools page.
1.0.1
- Avada / Fusion Builder: images referenced as
image_id="123|full"are now detected. - ID lists are now detected anywhere in the list, not only at its start — this covers Avada galleries and carousels (
image_ids="…") and classic[gallery ids="…"]shortcodes.
1.0.0
- Initial release.
