Most media libraries grow for years and nobody ever audits them. A blog with twelve thousand attachments. A store carrying every product photo it has ever had, including the ones from the supplier who left in 2021. An old site that has been through three themes. Somewhere in there are images no page has pointed at since 2019, four copies of the same photo under four filenames, and a few hundred JPEGs that should have become WebP a long time ago.
Almost nobody cleans that up, because almost nobody can tell what is safe to remove. Delete the wrong file and a product page loses its main photo, or the header goes blank, and you find out weeks later.
ZEJ Mediatidy is built to answer that question properly and then act on it.
Everything runs on your own server
Mediatidy uses the image libraries PHP already has on your host. No file is uploaded anywhere. There is no processing queue on somebody else’s machine, no credits, no API key, no account to create. That is also why it is free with no limits: there is no per image cost for me to pass on to you.
What it does
Deleting is recoverable
Deleting from Mediatidy moves the attachment into a plugin trash that keeps the database row, the metadata and the files on disk. There is a restore button next to every trashed item. Nothing is actually destroyed until you empty the trash, and trashed items sit there for 30 days before they become eligible for purging. Mediatidy also rechecks an image for references at the moment you delete it, so a scan result that has gone stale cannot take down a file that has since been used.
Built to survive very large libraries
Every scan walks the library in batches of 200 attachments, one request at a time, with a live progress bar and a cursor that remembers where it stopped. A library of 50,000 attachments takes the same code path as a library of 500, just for longer. No single request ever has to hold the whole library in memory, so there is no timeout and no exhausted memory limit at exactly the size where this problem starts to matter.
Reference detection that looks in the places that bite
Before Mediatidy calls an image unused, it checks post content and excerpts across every post status rather than published posts only, post meta including featured images and page builder payloads, the options table, theme mods, the site logo and the site icon, custom CSS, widgets, term meta, user meta, navigation menu items, reusable blocks and template parts, and WooCommerce product galleries. Resized variants count as usage of the file they came from. When an image is referenced, Mediatidy names the places it found it, so you can go and look for yourself.
Honest about what it changes
ZEJ Mediatidy does not use any external service.
Every scan, hash, conversion, compression and metadata edit happens on your own server through
the GD or Imagick extension that PHP already has. No image and no data about your site is sent
anywhere. There is no account, no API key, no licence check, no analytics and no update ping to
any server of mine. The plugin makes no outbound network request at all.
That is also why it is free with no image limit: because the processing runs on your hardware
rather than on a server I pay for, a library of fifty thousand images costs me exactly what a
library of fifty costs me.