Description
Broken Media Inspector is a fast, free media-maintenance tool for WordPress. It does two jobs exceptionally well โ and unlike many alternatives, there is no paid tier, no row limit, and no external service.
๐ฉบ Broken Media
After a migration, backup restore, or hosting change, images go missing. Broken Media Inspector scans every item in your Media Library and tells you:
- Which images are broken (file missing from disk, or incomplete metadata)
- Exactly which posts, pages, galleries and featured images use them โ with direct edit links
- The likely cause and how to fix it
Missing files are grouped by folder, so a whole missing directory shows up as a single line instead of hundreds โ the fastest way to spot a migration that dropped a folder. Results export to CSV.
The scan runs in two phases: a fast pass that checks every file on disk, then a background pass that works out usage only for the broken items. Thousands of images scan in seconds.
๐งน Orphaned Files
Over time your wp-content/uploads folder collects files that are no longer in the Media Library โ leftovers from deleted posts, failed imports, and manual uploads. Broken Media Inspector finds them, shows you how much space they take, and lets you either:
- Add to Library โ register the file so WordPress manages it again, or
- Archive โ move it (with its folder structure preserved) to
wp-content/uploads/fbmi-archive
Archiving is a safe, reversible cleanup. Nothing is deleted straight away: you archive the files you think you don’t need, check your site still looks right, and only then empty the archive. Changed your mind about a file? Restore it back to uploads in one click. This “archive, verify, then delete” workflow means you never lose a file you actually needed.
Generated thumbnails are recognised and never mistaken for orphans. Every file action is validated to stay inside your uploads folder and is limited to administrators.
Why choose this plugin
- Free and unlimited โ no premium upgrade, no capped results
- Fast โ two-phase scanning and in-memory usage matching
- Safe โ the broken-media scan is read-only; file actions only touch what you select
- Self-contained โ no external API calls, works on any host including shared hosting
- Zero configuration โ install, activate, scan
Features
- Broken image detection โ missing files and incomplete metadata
- Folder grouping โ whole missing directories summarised in one line
- Usage mapping โ featured images, Gutenberg blocks, galleries and direct URLs, with edit links
- CSV export โ hand the report to a colleague or keep it on file
- Orphaned file scanner โ find unregistered files in wp-content/uploads
- Safe archive workflow โ archive orphans, verify your site, then delete or restore
- Import orphans โ add unregistered files back into the Media Library
- Thumbnail-aware โ generated sizes are never flagged as orphans
- Two-phase scanning โ fast results even on large libraries
- No configuration, no external services, no paid tier
Usage
The plugin lives at Tools > Broken Media Inspector and has three tabs.
Broken Media
- Click “Scan Media Library”.
- A progress bar tracks the scan; results appear grouped by folder.
- For each broken image you see the likely cause, a suggested fix, and direct edit links to every post/page/gallery that uses it.
- Click “Export CSV” to save or share the full report.
Orphaned Files
- Click “Scan Uploads Folder” to list files on disk that aren’t in the Media Library.
- Select the files you want to act on (individually or with “Select all”).
- Choose “Add to Library” (register them) or “Archive selected” (move them aside โ nothing is deleted yet). A progress bar tracks large batches.
Archive
- After archiving, check your site still looks and works correctly.
- Open the Archive tab: “Restore” anything you still needed, or “Delete selected permanently” to reclaim the space once you’re sure.
Support
For support, documentation, and feature requests, visit:
https://thebigcity.co.nz
License
This plugin is released under the GPLv2 or later license. See license.txt for full details.
Credits
Broken Media Inspector is developed by Christopher Andrews.
https://thebigcity.co.nz
Built to help WordPress administrators diagnose broken media after migrations, backups and hosting changes โ and safely clean up the stray files left behind. Free and unlimited. If it saves you time, you can support development at https://buymeacoffee.com/fraew โ
Screenshots




Installation
- Upload the plugin folder to
/wp-content/plugins/ - Activate the plugin through the ‘Plugins’ menu in WordPress
- Navigate to Tools > Broken Media Inspector
- Click “Scan Media Library”
FAQ
-
Is the Orphaned Files feature safe? Any risk?
-
Use it at your own risk, and always take a backup first. “Orphaned” only means a file is not registered in the Media Library โ it does not guarantee the file is unused. Themes, page builders, sliders, custom code, and other plugins (including WebP and image-optimisation plugins) can reference files directly in ways WordPress cannot detect from its database. Treat the orphan list as a strong hint, not a certainty.
That is exactly why the plugin does not delete orphans outright. Instead you Archive them โ they are moved to
wp-content/uploads/fbmi-archive, so your site behaves as if they were gone, but you can Restore any file instantly if something breaks. Only empty the archive once you have confirmed everything still works. -
Can the plugin fix broken images automatically?
-
No. The broken-media scan is diagnostic โ it tells you what’s broken, where, and why, but restoring missing files is up to you (usually from a backup). This keeps it simple and safe.
-
Will this plugin modify my files or database?
-
The broken-media scan is strictly read-only. The Orphaned Files tool can change things, but only when you ask it to. Archiving and restoring simply move files between
wp-content/uploadsandwp-content/uploads/fbmi-archive; permanent deletion happens only when you empty the archive. Every path is validated to stay inside the uploads folder. -
How long does a scan take?
-
The broken-media scan checks every file on disk in a fast first pass, so even large libraries finish quickly โ typically a few seconds for a few thousand images, with usage details filled in afterwards.
-
Can I run this on a production site?
-
Yes. The broken-media scan only reads data. The orphan tools act only on the files you explicitly select.
-
Are generated thumbnails flagged as orphans?
-
No. The orphan scanner builds a list of every file WordPress knows about โ originals, scaled versions, and all generated thumbnail sizes โ so legitimate thumbnails are never mistaken for orphans.
-
Does this plugin require any external services?
-
No. Everything runs inside WordPress. No API calls, no cloud services, no data sent anywhere. Works on any hosting, including shared hosting.
-
Can I see which posts use a broken image?
-
Yes. For each broken image, the report shows which pages/posts reference it, with direct links to edit them.
-
I have 10,000+ images. Can this handle it?
-
Yes. The plugin processes images in batches and tracks progress. Even massive libraries are supported.
-
What if all images check out as healthy?
-
Congratulations! No action needed. The report shows detailed counts and can be exported as proof for your team or clients.
-
Does this work with image optimization or WebP plugins?
-
The broken-media scan works alongside any optimisation, lazy-load or CDN plugin โ it checks whether the real file exists on disk. Note that WebP/optimiser plugins often create extra files (such as photo.jpg.webp) that aren’t in the Media Library, so those will appear in the Orphaned Files list. They’re usually in active use, so review before archiving.
-
Does this work with multisite?
-
Version 1.0 supports single-site installations. Multisite is a candidate for a future release.
-
Can I schedule automatic scans?
-
Not in Version 1.0. Scheduled scanning is a candidate for a future release based on user feedback.
-
How do I interpret the “likely cause” suggestions?
-
The “likely cause” is a best guess based on the type of failure:
- Missing โ the file isn’t on disk. Usually the uploads folder (or a sub-folder) wasn’t copied during a migration or restore, or the file was deleted manually.
- Metadata issue โ the file exists but WordPress has no size/metadata for it, typically from an incomplete upload or import.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“fraew Broken Media Inspector” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “fraew Broken Media Inspector” 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.0
- Initial release
- Broken media scan: missing files and incomplete metadata, grouped by folder
- Usage mapping with edit links (featured images, Gutenberg blocks, galleries, direct URLs)
- Two-phase scanning for fast results on large libraries
- CSV export of the full report
- Orphaned Files scanner for wp-content/uploads
- Import orphaned files into the Media Library
- Safe archive workflow: archive orphans, then restore or permanently delete from the Archive tab
- Thumbnail-aware orphan detection
- WordPress 5.0+ and PHP 7.4+ support
