Quick summary
Use the WP Media Cleanup plugin (by Duplicator) to scan your media library for auto-generated image variations and safely delete unused sizes in bulk while keeping original uploads and key theme assets intact.
Why remove unused image variations?
– WordPress creates multiple resized copies (thumbnail, medium, large, plus theme/plugin-specific sizes) for every image upload. Over time these files accumulate and waste space.
– Example: a 2 MB original plus five 500 KB variations becomes 4.5 MB total for one image.
– Benefits:
– Smaller, faster backups
– Lower disk usage and hosting costs
– Easier migrations and fewer files to manage
– Reduced chance of hitting host file-count limits
– Less clutter and confusion in your media library
Before you begin
– Make a full site backup. WP Media Cleanup keeps deleted variations in a 30-day plugin backup, but a complete backup is best practice—especially if your theme or custom code references nonstandard filenames.
Step 1 — Install and scan
1. Install and activate WP Media Cleanup (by Duplicator).
2. Enter and activate any license key if required.
3. Clear your site cache so the plugin sees current content.
4. Open Media Cleanup » Cleanup and run “Scan for Unused Variations.”
5. Wait for the scan to complete. The report lists images with unused variations, showing previews, filenames, counts, and space used.
6. Click “Show Details” to inspect which sizes are considered unused (for example: medium, large, 1536×1536).
Step 2 — Review and delete
– Deletion options:
– Delete All: remove every unused variation from the scan results.
– Delete Selected Variations: tick checkboxes for specific sizes you want to remove.
– Individual Delete: remove variations for a single image.
– The plugin targets only auto-generated size variations (names like -150×150.jpg) and preserves original source files.
– A confirmation dialog appears before deletion to help avoid mistakes.
Step 3 — Restore deleted variations (if needed)
– WP Media Cleanup retains deleted variations in its own backup for 30 days.
– If an image appears broken on your site:
1. Right-click the broken image and copy the image address.
2. Extract the filename (for example, my-header-image-150×150.jpg).
3. In WP Media Cleanup’s Restore page, paste the filename into the search box to filter backups.
4. Select the file and click Restore.
– Important: plugin backups are removed after 30 days, so review critical pages soon after cleaning.
Switching themes
– New themes may require different image sizes. After changing themes, run a thumbnail regeneration plugin to recreate needed sizes for layout and responsive images.
Advanced — Automate with WP-CLI
– WP Media Cleanup supports WP-CLI for scripted workflows useful to developers and agencies.
– Common commands:
– Find and list unused variations:
wp media-cleanup find_unused –format=table
– Delete unused variations with confirmation:
wp media-cleanup delete_unused –yes
– View storage statistics:
wp media-cleanup stats
– WP-CLI and SSH are usually available on VPS or many managed hosts; some shared hosts may not provide access.
Optimize files you keep
– After removing extra sizes, compress the remaining originals to reduce page load times and further save storage.
– Use an image optimization plugin to shrink files without noticeable quality loss. Cleaning first reduces the number of files you need to process and can save plugin credits and time.
Frequently asked questions
– Is it safe to delete unused image variations?
– Yes when using a dedicated tool like WP Media Cleanup. It targets automatically generated sizes and leaves originals. Still, keep a full site backup in case custom-coded references weren’t detected.
– How does WordPress create extra images?
– WordPress, plus themes and plugins, generates multiple sizes on upload so the site can serve appropriate resolutions and layouts.
– How often should I clean my media library?
– For busy sites, every 3–6 months. Smaller sites can often do it annually.
Resources and next steps
– After cleanup: run an image compression plugin and consider a thumbnail regeneration if you’ve changed themes.
– Related guides: image optimization for web, best image compression plugins, WordPress speed optimization, and recommended backup plugins.
Summary
Cleaning up unused image variations is a quick, high-impact way to reclaim server space, speed backups, and simplify media management. Use WP Media Cleanup to scan, review, and safely remove unused sizes, restore anything accidentally removed from its 30-day backup, and then optimize the originals for best performance.