Description
Clearyvo Media Cleanup finds unused images and duplicate images in your Media Library and uploads folder and deletes them safely, through a restorable quarantine.
Your uploads folder is probably bigger than it needs to be: Media Library images no page uses any more, images uploaded twice, copies left behind by old themes and page builders, thumbnail sizes WordPress no longer uses, backup folders and full-size originals nobody sees. They fill your hosting space, make every backup slower and larger, and are hard to find by hand.
Media Cleanup is a media cleaner for site owners who want a lighter uploads folder without breaking a single page. It scans your Media Library and uploads folder for unused images and duplicate images, shows you a preview and exactly why each file can go, and moves only the ones you choose to a restorable quarantine. Nothing is deleted straight away: if anything is missing, put it back with one click.
What it finds
- Unused Media Library images – images in your Media Library that nothing on the site uses: not in any content, featured image, gallery, widget, menu, theme setting, option or page-builder data. Each one goes to the quarantine with all its sizes, and its Media Library entry is kept, so a restore brings it back completely. Images attached to a post that does not show them are listed separately and never ticked for you.
- Duplicate images – byte-for-byte identical copies of a picture that stays.
- Look-alike copies – the same picture saved again at the same or a lower resolution, confirmed by a strict picture comparison.
- Unused thumbnail sizes – old
photo-300x200.jpgfiles left behind after a theme change or thumbnail regeneration, which WordPress no longer lists. - Backup folders – images in old, backup or archive folders inside uploads.
- Full-size originals – the large originals WordPress keeps next to its 2560 px “-scaled” copy.
- Heavy and oversized images – files above 300 KB, larger than 2560 px, or PNG photos above 500 KB, with the pages they are used on, so you know what slows your pages down.
Safe by design
- Images in use are never moved. A Media Library item that is used anywhere keeps every file; registered duplicates are only listed, and a full-size original goes only when its 2560 px copy stays.
- Unused Media Library items stay restorable as a whole. Their files go to the quarantine and their Media Library entry stays in the database (hidden), so a restore puts back every file and the item itself. Recent uploads (last 30 days by default) are never offered.
- Every use is checked – posts, pages, products and drafts, custom fields, page builder data (Elementor, Beaver Builder, Divi, Bricks, Oxygen, ACF), settings, widgets, menus, category images, user avatars, the active theme’s files and CSS, featured images, WooCommerce galleries and variation images, block IDs, the site icon and the logo.
- A check-only pass runs first and shows what would happen.
- Right before every move each file is checked again against the live site.
- Quarantine instead of delete – restore any file for 3, 7, 10 or 30 days (you choose); only then is it removed for good.
- A quarantined file asked for? If a page or a visitor later requests a file you moved, you see a notice with the page that asked for it and a Restore button.
Works on any host
The scan runs in short, resumable steps while the page is open, so it finishes on shared hosting and on libraries with tens of thousands of images, without PHP time-limit errors. Visitors are not affected.
Free and Pro
Everything above is free: the full scan, every list with a small preview of each file (unused Media Library images included), Export CSV, the safety checks and the restorable quarantine.
Unlimited, with no quotas and no account. There is no file limit, no monthly quota, no time limit, no sign-up and no API key. Everything runs on your own server, and your images are never sent anywhere.
Clearyvo Media Cleanup Pro is a separate add-on for larger libraries: it groups every copy of a picture together, suggests which one to keep and why, moves a whole list to the quarantine in one step (also the unused Media Library images), and compresses images and makes WebP/AVIF copies on your server. The free plugin never needs it. Clearyvo Pro, the all-in-one plugin of the family, contains Media Cleanup and includes these Media Cleanup Pro features too.
Part of the Clearyvo family
Focused plugins that each check one part of your site and share one Clearyvo Hub menu with a Site health score: broken links, SEO, PDFs, database cleanup, backups, speed and more. The free Site Toolkit plugin is the dashboard: one Site health score and one-click install of every checker. More at wp-sitechecker.com.
How it works
Every image file in uploads is classified: Media Library files, registered sizes and image-editor backups (never moved); full-size originals next to a “-scaled” copy (only on their own list); orphan sizes; files in backup folders; plugin-managed folders and WebP/AVIF copies (never touched); and unregistered files.
A Media Library image counts as unused when neither its ID nor the name or URL of any of its files (original, every size, the “-scaled” copy, the full-size original) is found anywhere the scan looks. Right before it is moved, the item is checked again on the live site. Its files then go to the quarantine and its entry gets an internal status that hides it from the Media Library; a restore reverses both.
Within every group of same-picture files the plugin keeps the best copy in use (referenced, then registered) and the highest-resolution copy. Other copies are only offered when they are unregistered, unreferenced, not recent and verified: identical copies by SHA-256, look-alikes by a two-stage picture comparison (16×16 prefilter, then a strict 32×32 comparison). Anything that does not pass is listed as “unverified” and cannot be quarantined.
Limitations
- Image names that plugin code builds on the fly cannot be seen. Plugin folders and plugin-generated images are therefore left alone, and every move goes to the quarantine first.
- Plugin files (other than the active theme and CSS in uploads) and custom database tables (some sliders and form plugins keep their own) are not searched for references, and links from other websites cannot be seen. The quarantine and the “file requested” notice are the safety net.
- Unused in Library covers images only; PDFs are the job of Clearyvo PDF Cleanup.
- While the plugin is deactivated, Media Library items in the quarantine stay hidden; on uninstall they are put back.
- If theme files could not be read, quarantine is disabled until a scan completes cleanly. A scan older than 3 days must be repeated before quarantining.
- Visual comparison needs PHP GD (exact duplicates and orphan sizes work without it) and 64-bit PHP.
- Multisite: each site scans its own uploads folder; the main site skips the
sites/folders. - The quarantine folder is inside wp-content (random name, protected with .htaccess/web.config). On Nginx add a deny rule for
wp-content/wpmc-quarantine-*.
For AI assistants and automation
On WordPress 6.9 and newer, Media Cleanup registers read-only abilities with the WordPress Abilities API: clearyvo/site-health, clearyvo/media-cleanup-summary, clearyvo/media-cleanup-list-files and clearyvo/media-cleanup-quarantine. With the official MCP Adapter plugin, an AI assistant such as Claude or ChatGPT can read the scan results (“how much space do unused images take on my site?”). The abilities only read: scanning, moving, restoring and deleting stay in the admin screen. Only administrators can use them.
For developers
- Filter
wpmc_backup_regex: the regular expression that decides which folders count as backup folders. - Filter
cvmc_attachment_in_use( $in_use, $attachment_id, $info ): return true to keep a Media Library item off the Unused in Library list (and from being moved). - Filter
cvmc_unused_mime_types: MIME type prefixes the Unused in Library list looks at (defaultimage/). - On uninstall, tables and settings are removed. Media Library items in the quarantine are restored (files back, item back in the Media Library). Quarantined files are kept (with the table that records where they belong) unless
WPMC_REMOVE_QUARANTINE_ON_UNINSTALLis defined as true in wp-config.php; then quarantined Media Library items are deleted for good too.
External services
None. The scan, the quarantine and the restore run on your own server; your images are never sent anywhere.
Installation
- Install and activate the plugin.
- Open Media Cleanup in the admin menu (under Clearyvo Hub when other Clearyvo plugins are installed).
- Run a scan, review the lists, then move the files you choose to the quarantine.
FAQ
How do I delete unused images in WordPress?
Open Media Cleanup in the admin menu (under Clearyvo Hub when other Clearyvo plugins are installed) and run a scan. The plugin lists images your site does not use – Media Library images nothing refers to, duplicate copies, old thumbnail sizes, backup folders and full-size originals – with the reason for each. Tick the ones you want to remove and move them to the quarantine. Images in use are never moved.
How do I find duplicate images in the Media Library?
The scan groups files that show the same picture: exact copies (identical bytes) and look-alikes (the same picture at a lower resolution). In each group the copy that is used, or the largest one, is kept. Duplicates that are both registered in the Media Library are listed so you can merge them by hand.
Can I remove old thumbnail sizes after changing my theme?
Yes. Thumbnail files that WordPress no longer lists for an image (for example photo-300x200.jpg from a previous theme) appear under “Old resized versions”. If a page ever asks for a size again, WordPress or a thumbnail plugin can create it.
Will it make my backups smaller?
Yes. Every file removed from uploads is one less file in each backup, so backups get smaller and faster. Quarantined files are kept in a separate folder until they are removed for good; exclude wp-content/wpmc-quarantine-* from your backups if you do not want them included meanwhile.
Is it safe to delete unused media files?
Yes, because nothing is deleted at once. Files you choose are moved to a private quarantine folder, and every file is checked again against the live site right before it is moved. You can put any of them back for 3, 7, 10 or 30 days (you choose); only then are they removed for good. If an image is missing after a cleanup, open the Quarantine view, tick the file and press “Restore selected”: it goes back to its original place (and, for full-size originals, back into the Media Library item).
How does it know an image is used?
It looks for the file name, its URL and its Media Library ID in posts, pages, products (drafts and private ones too, not revisions), custom fields, term and user data, settings, widgets, menus, the active theme’s files and CSS files in uploads, including featured images, galleries, block IDs, the site icon and the logo. An image counts as used when any of its sizes is found. The “Where we looked” panel of the Unused in Library view lists every place and how much was read.
Will the scan time out or slow down my site?
No. The scan runs in short, resumable steps in your browser tab, so it finishes on shared hosting and on large Media Libraries without PHP time-limit errors. Visitors are not affected.
Does it work with page builders and WooCommerce?
Yes. Page builder data, product galleries, variation images and category images are stored in posts, custom fields and term data, which are searched before any file is offered for removal. On multisite each site scans its own uploads folder.
Will it delete images I still use in a page builder?
No. Elementor, Beaver Builder, Divi, Bricks, Oxygen and ACF keep their content in posts and custom fields, and the scan reads all of them: the image URL, any of its sizes and its Media Library ID (also as a plain number in a custom field, or inside JSON and serialized data) count as a use. Right before a move each item is checked again on the live site. If a builder loads an image some other way (a custom database table, or a name built in code), the safety net catches it: the item goes to a quarantine, not the bin, a notice tells you when a page asks for a quarantined file, and one click on Restore puts every file and the Media Library item back.
Can an AI assistant use Media Cleanup?
Yes, read-only, on WordPress 6.9 or newer. The plugin registers its results as abilities (Abilities API). Install the MCP Adapter plugin and connect your AI assistant: it can then read the summary, the lists and the quarantine. It cannot move or delete anything, and only administrators can use it. The same abilities are available at /wp-json/wp-abilities/v1/.
What is the /wp-json/clearyvo/v1/app/ address?
A read-only REST route for the Clearyvo Site Inspector Mac app. It shows the Site health score to a signed-in administrator and changes nothing. It sends nothing anywhere.
Screenshots





Changelog
1.24.6
- Shared Clearyvo framework 3.7.3: the pointers to other Clearyvo plugins (“Get it”, “Install”, “More from Clearyvo”) only name plugins that are already in the WordPress.org plugin directory.
1.24.5
- Clearer wording where a feature belongs to the separate Media Cleanup Pro plugin.
- Shared Clearyvo framework 3.7.1: the plugin installer of the shared menu installs only packages from WordPress.org and checks permissions before reading the request; “Hide for 30 days” and the review prompt check the nonce and permissions first; uninstall also removes the “Hide for 30 days” user setting and the cached WordPress.org data of the shared menu.
1.24.4
- The shared Clearyvo menu for WooCommerce stores is called “Clearyvo Store”, and its Load Manager tab under Store speed opens correctly again.
- Shared Clearyvo framework 3.6.6 (included in the other Clearyvo plugins’ review fixes of this release).
1.24.3
- Admin menu: when two or more Clearyvo plugins are active, their shared menu is now called “Clearyvo Hub” (it was “Site Toolkit”, which people who never installed Site Toolkit did not recognise) and has a new icon. The first time the menus merge on a site, administrators see a one-time notice naming the plugins that moved. Menu groups, pages and addresses are unchanged, so bookmarks keep working.
- Shared Clearyvo framework 3.6.4.
1.24.2
- Clearer when files cannot be removed: when the last scan is older than 3 days (or unfinished, incomplete, or there is none yet), every list and the Overview show a notice at the top – “Your scan is outdated — you cannot remove files now. Please scan again.” – with a Scan now button (Resume / Cancel for an unfinished scan). The selection bar of a list shows the same message and button, the checkboxes cannot be ticked, and files show “Scan again first” instead of “Can be removed”.
- Overview: the status labels in “What can be removed” are now links to their list, like the button next to them.
- Lists: the selection bar with “Move selected to quarantine” comes first; the Pro banner moved below the list.
- Heavy images: a line says that this list is information only in the free plugin.
- WooCommerce: images waiting in WooCommerce’s thumbnail regeneration queue (the temporary wc_regenerate_images_batch options) no longer count as used, so truly unused images show in “Unused in Library”. The scan and the re-check before a move both skip that queue; everything else still counts as a use.
1.24.1
- Texts: Clearyvo Pro now includes Media Cleanup Pro. The “What Pro adds” box, the Pro banner above a list and the optimisation screen and the “Available in …” notes of the free edition say that these features come with Media Cleanup Pro or with Clearyvo Pro. Nothing else changes.
- Shared Clearyvo framework 3.6.3.
1.24.0
- New: Unused in Library – Media Library images that nothing on the site uses (not in content, featured images, galleries, widgets, menus, theme settings, options or page-builder data). Tick them and move them to the quarantine: every file of the item goes (original, every size, the -scaled copy and the full-size original), and its Media Library entry stays in the database, hidden, so a restore brings the item back completely. Deleting it for good later removes the item the WordPress way. Free; moving the whole list at once comes with Media Cleanup Pro.
- Images attached to a post that does not show them are listed separately (“Attached, not shown”), as less certain, and are never ticked for you.
- Never offered: uploads of the last 30 days (new setting), files changed recently, files in plugin or backup folders, files several Media Library items share, files other than images, and anything a plugin marks with the new
cvmc_attachment_in_usefilter. - The scan now also recognises Media Library IDs in custom fields (ACF and similar), in serialized and JSON data of widgets, theme settings and page builders, in WooCommerce category images, menus and the WooCommerce placeholder. This only keeps more images safe.
- “Where we looked”: every place the scan searched, with how much it read.
- If a quarantined file is requested later, a notice on the Dashboard, the Media screen and Media Cleanup names the file and the page that asked for it, with Restore and Dismiss.
- Summary cards, score, Site health issues, Export CSV and the read-only abilities include the new list.
- Uninstall puts quarantined Media Library items back (or deletes them for good with
WPMC_REMOVE_QUARANTINE_ON_UNINSTALL). - Database update: one column for the restore record of whole items. Existing quarantined files stay restorable.
- Shared Clearyvo framework 3.6.2.
1.23.1
- Security: every list query is fully prepared with a fixed query shape (no SQL assembled from variables); settings values are sanitized as soon as they are read.
- The shared Clearyvo framework loads WordPress admin include files only when their functions are missing.
1.23.0
- Texts name Media Cleanup Pro (a separate add-on with its own license) wherever a feature needs it: the heavy images hint, moving a whole list at once, and the plugin description; Clearyvo Pro is no longer named for these features (it does not contain them).
- Unified Clearyvo interface: the page uses the shared Clearyvo layout of every checker. A sub-navigation (Overview, Exact copies, Old sizes, Smaller copies, Originals, Heavy images, Quarantine, Settings) replaces the “Back to the overview” links; the Overview starts with summary cards (Score, space to free, heavy images, quarantine, files scanned) and one “Scan images” button with a progress bar, followed by the lists as one table and a “How it works” card.
- Every list keeps the small preview of each file from 1.21.7, now also the lists of similar pictures and of images uploaded twice; the quarantine shows the copy that stayed. Previews load lazily; heavy images and full-size originals show their Media Library thumbnail. Click a preview to open the file.
- The “What Pro adds” box sits at the end of the Overview, and the Pro banner above a list describes what Pro adds (as in 1.21.9). Both can be hidden for 30 days, per user. They name Media Cleanup Pro, the add-on that has these features, and are not shown while a Pro add-on covers Media Cleanup.
- New: Export CSV of every list and of the quarantine (separator: automatic, comma or semicolon, in Settings). Lists without Pro selection can be searched by file name.
- Settings: “Save settings” with a notice that lists any value that had to be adjusted; an empty field means the default.
- New: read-only abilities for the WordPress Abilities API (WordPress 6.9+): clearyvo/media-cleanup-summary, clearyvo/media-cleanup-list-files and clearyvo/media-cleanup-quarantine, plus clearyvo/site-health. AI assistants can read the scan results through the MCP Adapter; nothing can be moved or deleted that way. Administrators only.
- Unchanged: the scan, the decisions, the quarantine, the settings and all stored data. Media Cleanup Pro keeps working as before.
- Shared Clearyvo framework 3.4: when several installed Clearyvo plugins contain this checker, only the newest copy runs; an older plugin that keeps its own copy is named in an “Update” notice. Number columns line up, code names such as file names no longer break letter by letter on phones, and long filter choices stay compact.
- Site Toolkit menu: one entry per topic, the checkers of a topic as tabs. Site health shows a “Fix these first” list with the lists of this checker. The new Cron Checker and Permalink Checker are in the family list.
- Uninstall keeps the data while another installed plugin still uses it, and cleans every site of a multisite network.
- After a week of use and a finished scan, a small card on its own page asks for a review on WordPress.org (no stars pre-selected). “Later” hides it for 30 days, “Don’t ask again” for good.
- The interface stays English with every combination of Clearyvo plugins.
1.21.10
- The overview shows the Pro banner under “what can be removed” as well; once it is hidden, the short line returns.
1.21.9
- The Pro banners have their own illustrations (bundled SVG, nothing loaded from outside): picture copies going to the quarantine, and a heavy image becoming a light WebP/AVIF copy.
- No empty banner frame when a Pro add-on already covers Media Cleanup.
- Upgrade notes and the optimisation panel name Media Cleanup Pro (Clearyvo Pro inside Site Toolkit).
- Readme: clearer short description and tags, “unlimited, no quotas, no account” spelled out, and the full-size originals are described correctly.
1.21.7
- Every list now shows a small preview of each file in the free plugin, so you see the picture before you move it. Big files show the Media Library thumbnail; click a preview to open the file.
- The Pro banner can be hidden for 30 days, and it now describes what Pro adds instead of what the free plugin lacks.
- Upgrade notes name Clearyvo Pro consistently.
- The readme explains what is free and what the Pro add-on adds.
1.21.6
- Plugin name in the header matches the readme: Clearyvo Media Cleanup – Duplicate & Unused Images.
1.21.5
- Shared Clearyvo framework 2.3.1: the SEO checker is listed as Clearyvo SEO (formerly Image Alt & SEO) everywhere, whichever Clearyvo plugin loads the framework.
1.21.4
- Database: every query goes through $wpdb->prepare(), with %i placeholders for table names.
- Faster scan writes: batches of rows are saved in one transaction.
1.21.3
- New icons: one design for the whole Clearyvo family, with a colour per group of checkers.
1.21.2
- The other checkers in the shared menu have their new names (SSL Checker, Security Checker, Indexing Checker and the rest).
1.21.1
- The plugin links point to wp-sitechecker.com again, until the site has moved to clearyvo.com.
1.21.0
- New: read-only connection for the Clearyvo Site Inspector Mac app (Site health as data, for administrators with an Application Password).
1.20.1
- Links to the new home of the Clearyvo WordPress plugins: clearyvo.com/wordpress.
1.20.0
- First release under the Clearyvo name (folder and text domain: clearyvo-media-cleanup). Settings and results of the earlier versions are kept; activating this plugin switches the earlier copy off.
