Janitorix Media Audit — an unused image cleaner that proves it first

By Monowar Hossain Rated 5.0 out of 5 from 2 reviews on WordPress.org

Summary. Janitorix Media Audit finds the images in your WordPress media library that nothing uses — then shows its evidence before it suggests deleting anything. Every file gets two separate scores, one for confidence and one for risk, and the plugin only ever moves files to Trash. Free, no Pro version.

Janitorix Media Audit at a glance
Version1.1.0
Last updated
RequiresWordPress 6.2 or later, PHP 7.4 or later
LicenseGPLv2 or later
PriceFree, no Pro version

Full version history: Janitorix Media Audit changelog on WordPress.org.

Why deleting unused images is risky

Every media library fills up the same way: old banners, replaced logos, test uploads, the three spare photos from a post that used one. Leaving them costs a few kilobytes each. Deleting one that is still referenced — a Customizer background, an ACF field, a page-builder section — breaks a page you might not open for weeks.

Most cleanup tools treat those two mistakes as equal. They scan, they flag, they hand you a delete button. This plugin starts from the opposite end: the cost of being wrong is the whole design. That is why "is this used?" is never one answer here. It is two.

How the two-score verdict works

Each image is checked by scanners covering post content, Gutenberg blocks and synced patterns, full-site-editing templates, the Customizer, theme options, widgets, menus, Elementor, ACF, WooCommerce, and the theme's own PHP, CSS and JavaScript files. The result comes back as two judgements:

  • Confidence — how sure the plugin is that the image is genuinely unused.
  • Risk — how much damage deleting it would cause if the plugin is wrong.

A stray test upload and an unreferenced site logo can score identically on confidence and need opposite treatment. That is why risk is scored on its own, and why anything at medium risk or above is never offered for Trash at all.

Diagram of the six places a WordPress image reference can live — post content, post meta, options, term and user meta, theme files, and a URL assembled at render time — labelled by whether each stores the URL or the attachment ID
What the scanners are up against: a reference can live in six different places, and they do not all store the same thing.

What Janitorix refuses to delete

  • Will not recommend deleting anything if scan coverage was too low — it asks for a rescan instead
  • Will never touch a site logo, icon or header — refused outright, not just scored low
  • Will not touch anything uploaded in the last 24 hours — it may not have been placed yet
  • Never deletes in one step — Trash first, always, so anything can be restored

WP-CLI support for scans

The whole thing also runs from WP-CLI: scan the library, ask why one image got the verdict it did, preview exactly what would be deleted without deleting anything, and calibrate the engines against known answers. The read-only preview is the same evidence the admin screens show, in CSV form.

Alt text audit with optional AI suggestions

Version 1.1.0 adds a separate screen listing every image missing alt text — or carrying a weak one like "IMG_2034" — with a replacement suggested from the filename, title, or parent post. The suggestion is editable: apply it as-is or write your own words, mark the image decorative, and undo anything. A Dashboard card tracks coverage, and wp janitorix alt stats reports it for scripting.

An AI model can give a second opinion, but only if you enable it with your own API key — one-click presets for Gemini, OpenAI, Groq, and OpenRouter, plus a test-connection button. Each suggestion is reviewed before saving, exactly like a rule-based one. Nothing here touches confidence, risk, or any deletion recommendation.

FAQ

Does it delete images permanently?
No. It only ever moves files to Trash, so anything can be restored. There is no one-click permanent delete.
What if the plugin is wrong about an image?
That is what the risk score is for. Anything at medium risk or above is never offered for Trash, however confident the scan is.
Will it touch my logo or header image?
No. The site logo, icon and header are refused outright, as is anything uploaded in the last 24 hours.
Can I run a scan from WP-CLI?
Yes. Scan, explain, preview deletions and calibrate — all from the command line.
Is there a Pro version?
No. Confidence and risk scoring, Trash-only cleanup and WP-CLI — everything is in the free plugin, reviewed by the WordPress.org team before release.
Does alt text change on its own?
No. Nothing is applied until you click Save or Apply on that image, and every change keeps an undo.
Is the alt text shown here the same as on the page?
Not always. This screen reads the alt text stored on the image itself; a theme or page builder may override it where the image is shown.

Get started with Janitorix

If you want to understand the problem first — where a reference can hide and how to check one image by hand — that is the full guide. If you want the tool, it is one search away in your dashboard.

Monowar Hossain

Written by Monowar Hossain — WordPress Developer specialising in custom themes, plugins, Elementor, ACF, and performance optimisation. Open Source Contributor. Also known online as devmonowar.

Published 12 September 2026