Directory / plugin
Ghostpix Broken Image Cleaner
v1.0.0 · by Harit Panchal
Find images whose files are missing from your uploads folder and remove them from post content safely — after review, with one-click undo.
About this plugin
Over the years, a WordPress site loses image files. Migrations drop them, media
libraries get purged, folders get reorganised. The <img> tags stay behind in your
post content, pointing at files that are no longer there. Visitors see a broken-image
icon, your server answers a 404, and the damage is spread across thousands of old
posts that nobody is going to open by hand.
Ghostpix Broken Image Cleaner finds those references and removes them from the content itself.
It edits your content, so it is built to be careful about it:
- Nothing is changed without your say-so. Scanning is read-only. It produces a
list. You decide which entries to act on. - Detection is based on the filesystem, not guesswork. The plugin checks whether
the file actually exists in your uploads folder. There are no network requests, so
there is nothing to be confused by a slow server, a timeout, or hotlink protection. - Every removal can be undone. The post’s original content is saved before the
edit, and a single click puts it back. - The rest of your post is left alone, byte for byte. Only the broken image is
touched. Your markup, shortcodes and formatting are not reformatted around it.
It cleans up the leftovers, too. Removing an <img> usually strands the markup
that wrapped it. The plugin also removes the container when nothing else is left in
it — the Classic Editor’s [caption] shortcode, a link that only wrapped the image,
and empty <figure>, <figcaption> and <picture> elements. No empty boxes or
orphaned captions left behind.
Built for Classic Editor content
This plugin targets content where images live as raw HTML in the post body, which is
how the Classic Editor stores them. That is exactly the older content most likely to
have accumulated broken images.
No external services
This plugin makes no outbound connections of any kind. It does not phone home, does
not send your content anywhere, and does not require an account. Everything happens
on your own server.