Description
AVAR Media Optimizer helps you take control of a growing WordPress Media Library without turning cleanup into a risky guessing game.
Find media that appears unused, discover orphan files outside the Media Library, detect duplicates, optimize images, generate modern WebP or AVIF versions, and safely move unwanted media to a restorable trash before deleting it permanently.
Everything is designed around one principle:
Free up storage and improve your media library without taking unnecessary risks with your files.
Find unused media with confidence
Over time, WordPress websites collect images and files that may no longer be needed. The difficult part is knowing which ones are actually safe to remove.
AVAR Media Optimizer scans common WordPress references and classifies media into clear groups:
- Used β a supported reference to the media was found.
- Unused β no supported reference was detected.
- Verify manually β the plugin found an ambiguous, custom or unsupported situation and will not automatically treat the media as safe to remove.
The scanner checks many common locations, including:
- posts and pages,
- featured images,
- WooCommerce product galleries,
- Elementor data,
- ACF and custom metadata,
- widgets and WordPress options,
- users, terms and comments,
- generated thumbnails,
- scaled image variants,
- WebP and AVIF copies.
No WordPress plugin can understand every custom theme, page builder or plugin ever created. When AVAR Media Optimizer is not confident, it prefers to ask for manual verification rather than make an aggressive cleanup decision.
Safe cleanup with a restorable trash
Cleaning a Media Library should not mean permanently deleting something with one click.
Media can be moved to a protected plugin trash first, together with the data needed for recovery.
You can:
- restore attachments,
- restore related thumbnails,
- restore WordPress attachment metadata,
- configure trash retention,
- permanently delete items only when you are ready.
The plugin includes additional safeguards around destructive operations to reduce the chance of overwriting or deleting unrelated files.
Find orphan files outside the Media Library
Not every file inside wp-content/uploads belongs to a valid Media Library attachment.
The disk scanner can help identify:
- files not registered in the Media Library,
- stale thumbnail files,
- orphan WebP or AVIF files,
- files left behind by removed attachments,
- media that can potentially be adopted into WordPress.
Detected files can be reviewed before any action is taken.
Detect duplicate media
Duplicate uploads can quietly consume a large amount of storage.
AVAR Media Optimizer detects duplicates by comparing file content rather than relying only on filenames.
This makes it possible to discover identical files even when they were uploaded under different names.
Optimize images locally
Reduce image size directly on your WordPress server.
AVAR Media Optimizer does not upload your images to an external optimization service.
Depending on the image libraries available on your hosting environment, the plugin can:
- optimize JPEG, PNG and WebP images,
- resize oversized images,
- keep a recovery copy of the original,
- restore the original image,
- generate WebP versions,
- generate AVIF versions.
Available formats and optimization results depend on your server’s PHP image-processing libraries, memory and available resources.
Generate WebP and AVIF
Modern image formats can significantly reduce image size while maintaining visual quality.
AVAR Media Optimizer can generate WebP and AVIF versions when your server supports them.
The Diagnostics screen shows which image formats are available on your hosting environment.
Replace media without changing the attachment ID
Need to update an image that is already used across your website?
The Media Replace tool lets you replace the physical files of an attachment while keeping the same WordPress attachment ID.
Standard WordPress references can therefore continue pointing to the same attachment.
Automate routine media maintenance
For larger websites, media maintenance does not need to be entirely manual.
AVAR Media Optimizer supports recurring maintenance workflows such as:
- scheduled scans,
- trash retention,
- image optimization tasks,
- background processing,
- summary e-mails.
WP-CLI commands are also available for administrators who prefer command-line workflows.
Built with safety in mind
Media cleanup is a destructive task, so AVAR Media Optimizer deliberately uses a cautious approach.
Depending on the operation, the plugin uses safeguards such as:
- protected internal storage,
- storage exposure diagnostics,
- ownership verification,
- recovery information,
- checksums,
- file and attachment locks,
- guarded restore operations,
- exclusions,
- warnings for uncertain results.
Before performing a large cleanup on any production website, we still recommend keeping an independent website and uploads backup.
Privacy-friendly image optimization
Your images are processed locally on your WordPress server.
AVAR Media Optimizer does not send media files or website content to an external image optimization service.
The plugin can perform a small request to your own website to verify that its recovery storage is not publicly accessible.
If your uploads are hosted on another domain, such as a CDN or object storage service, the plugin does not contact that external domain automatically. An external storage test is performed only when an administrator explicitly requests it from Diagnostics.
Screenshots





Installation
- Install and activate AVAR Media Optimizer.
- Open Media Optimizer in the WordPress administration.
- Run your first media usage scan.
- Review the scan results, especially Verify manually items.
- Configure cleanup, trash retention, optimization and automation according to your website.
FAQ
-
Can AVAR Media Optimizer tell me exactly which images are safe to delete?
-
The plugin detects many common WordPress references, but no automated scanner can understand every custom theme, plugin or externally stored reference.
When a result is uncertain, AVAR Media Optimizer places it into Verify manually rather than automatically treating it as unused.
Always review important media before permanently deleting it.
-
Are files permanently deleted during normal cleanup?
-
No. Standard cleanup can move media into the plugin’s restorable trash first.
Items remain recoverable until they are permanently purged manually or according to your configured retention rules.
-
Can deleted media be restored?
-
Media moved through the plugin’s trash workflow can be restored together with the files and WordPress data required by the recovery process.
-
Can the plugin find files that are not in the Media Library?
-
Yes.
The disk scanner examines the WordPress uploads directory and can identify orphan files, stale thumbnails, next-generation image copies and other files that are not associated with a normal Media Library attachment.
-
Can it detect duplicate images with different filenames?
-
Yes.
Duplicate detection compares file content, so identical files can be identified even when their filenames are different.
-
Does image optimization use an external service?
-
No.
Image optimization runs locally on your WordPress server. Media files are not uploaded to an external optimization service.
-
Why can’t I generate WebP or AVIF?
-
WebP and AVIF availability depends on the image-processing libraries installed on your server.
Check Media Optimizer > Diagnostics to see the capabilities detected on your hosting environment.
-
Can I restore an image after optimization?
-
If optimization backups are enabled and a recovery copy is available, the original image can be restored.
-
Does the plugin automatically contact my CDN or external storage?
-
No.
If uploads are served from another domain, AVAR Media Optimizer does not automatically contact it while checking storage protection.
You can explicitly run the external storage test from Diagnostics if you want to verify the configuration.
-
What happens when I uninstall the plugin?
-
By default, recovery data needed to restore trashed or optimized media is preserved.
Administrators who intentionally want to remove plugin data and recovery files can enable the complete removal option before uninstalling.
-
Does it support WordPress Multisite?
-
Network-wide activation is not supported.
Activate and configure the plugin separately for each individual site.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“AVAR Media Optimizer” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “AVAR Media Optimizer” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.22.4
- Initial WordPress.org release.
