Description
MegaOptim 2.0 is a WordPress image optimizer built around three goals:
- Further compress existing WebP and AVIF images. Next-gen formats are already small — MegaOptim 2.0 squeezes more out of them while keeping originals intact.
- Convert old JPG, PNG, and GIF images to WebP or AVIF. Modernize your Media Library and serve next-gen formats to supported browsers, with the original file preserved as a fallback.
- Optimize old formats in place. Make JPEG and PNG smaller without changing the format — useful when you want savings but don’t want a next-gen conversion. GIF, WebP, and AVIF compression are available through MegaOptim Cloud.
The plugin is free when you use the local method (GD or Imagick on your server). For smarter compression — including further optimization of existing WebP and AVIF files — add an API key and use MegaOptim Cloud, available for around $54 per year on unlimited sites.
Why Use MegaOptim?
- Further compress existing WebP and AVIF images for extra savings
- Convert JPEG, PNG, and GIF images to WebP or AVIF
- Optimize JPEG and PNG in place with no format change (GIF/WebP/AVIF compression via Cloud)
- Bulk process the WordPress Media Library
- Browse and process folders outside the Media Library
- Free local processing or smarter MegaOptim Cloud compression
- Automatically convert or compress newly uploaded images
- Serve WebP and AVIF with Apache
.htaccessor PHP passthru - Track background jobs with a built-in queue monitor
- Restore compressed originals from backup or remove generated next-gen files
- Optionally process retina images generated by WP Retina 2x / Perfect Images
- Use WP-CLI for bulk conversion, stats, reset, logs, and queue tools
Free Local Processing or MegaOptim Cloud
MegaOptim works without an API key. If your server has GD or Imagick, you can convert JPEG/PNG/GIF to WebP, generate AVIF where your server supports it, and compress JPEG and PNG entirely on your own server — free, forever. GIF, WebP, and AVIF compression are available via MegaOptim Cloud.
For noticeably better results — including further compression of existing WebP and AVIF images, smarter JPEG/PNG optimization, and broader AVIF support — add a MegaOptim API key. MegaOptim Cloud offloads processing from your server and costs just $54 per year for unlimited sites. Get an API key from the MegaOptim dashboard and see plans at MegaOptim pricing.
What MegaOptim 2.0 Can Do
- Next-gen optimization: Further compress existing WebP and AVIF images through MegaOptim Cloud
- Convert mode: Generate WebP or AVIF versions from JPEG, PNG, and GIF images
- Compress mode: Optimize original images in place (no format change) with local or smart cloud compression
- Media Library view: Process individual images, selected images, or run bulk jobs across the library
- File System view: Browse folders on your server and bulk-process images outside the Media Library
- Upload automation: Automatically convert or compress new uploads in the background
- Delivery settings: Choose Apache
.htaccessrules or PHP passthru rewriting to serve WebP and AVIF - Queue monitor: Watch active jobs, progress, failures, and background processing state
- Tools page: Run restore actions for compressed originals or remove generated WebP/AVIF derivatives
- Restore support: Restore compressed images from backup and regenerate thumbnails
- Logging and diagnostics: Use the built-in log viewer and queue statistics through WP-CLI
- Retina support: Optionally process
@2ximages created by WP Retina 2x or Perfect Images
Originals Preserved
MegaOptim 2.0 keeps your original uploads in place and generates next-gen derivatives alongside them. On the front end, MegaOptim serves the best format the visitor’s browser supports while keeping the original file available as a fallback.
Migration From Older MegaOptim Versions
MegaOptim 2.0 includes background migration for legacy settings and older attachment data. Existing users can upgrade and let MegaOptim migrate data in batches, with progress shown inside the admin UI while migration is running.
Screenshots

Optimizer dashboard with totals, bulk actions, and space savings overview 
Comparison Modal #1 
Comparison Modal #2 
Settings: API Key 
Settings: Conversion with Cloud Processing 
Settings: Conversion with Local Processing 
Settings: Compression with Cloud Processing 
Settings: Compression with Local Processing 
Settings: Upload behavior 
Settings: Frontend delivery for WebP/Avif 
Settings: Advanced 
Settings: Queue Monitor for background jobs
Installation
- Upload the MegaOptim plugin to
/wp-content/plugins/or install it through the WordPress plugin screen. - Activate the plugin.
- In WordPress admin, go to
Media > MegaOptim. - Open
Settingsand choose the local method (free) or add a MegaOptim API key for cloud processing. - Configure your conversion format, compression options, upload automation, and delivery method.
- Go to the
Optimizerpage to process Media Library images, or switch toFile Systemview to process folders on your server.
FAQ
-
Can MegaOptim further compress existing WebP and AVIF images?
-
Yes — this is a main focus of MegaOptim 2.0. MegaOptim Cloud can take WebP and AVIF files you already have and reduce them further, in addition to working on JPG, PNG, and GIF.
-
Does MegaOptim work without an API key?
-
Yes. The plugin is free with the local method. If your server has GD or Imagick, you can do WebP conversion (JPEG/PNG/GIF sources), local AVIF generation where supported, and JPEG/PNG compression at no cost. MegaOptim Cloud is needed for smarter compression, compressing GIF / WebP / AVIF files, and further optimization of existing WebP/AVIF files.
-
How much does MegaOptim Cloud cost?
-
The cloud plan is about $54 per year and works on unlimited sites. It provides smarter compression, offloads work from your server, and unlocks further optimization of existing WebP and AVIF files.
-
How do I convert JPEG to WebP in WordPress?
-
Install and activate MegaOptim, open
Media > MegaOptim, chooseConvertmode, set the output format toWebP, and start a bulk job from the Media Library or File System view. -
Can I convert PNG images to AVIF?
-
Yes. MegaOptim can generate AVIF images through MegaOptim Cloud, or locally where your server supports AVIF encoding. If your server does not support local AVIF encoding, use MegaOptim Cloud.
-
Can MegaOptim convert GIF images to WebP or AVIF?
-
Yes. MegaOptim 2.0 can convert GIF images to next-gen formats as part of its conversion workflow, alongside JPG and PNG.
-
Can I just optimize JPEG and PNG without converting them?
-
Yes. Use
Compressmode to reduce file size while keeping the original format. Local compression handles JPEG and PNG, runs free on your server, and uses fixed quality levels. MegaOptim Cloud additionally compresses GIF, WebP, and AVIF — and applies Smart Compression (SSIM-tuned per image) for smaller files at visually identical quality. -
What is the difference between Convert and Compress?
-
Convert creates next-gen WebP or AVIF files alongside the original image.
Compressoptimizes the image in its existing format — including further compressing existing WebP and AVIF files — without changing the format. -
Why use MegaOptim Cloud compression instead of local compression?
-
Local compression is free and runs entirely on your own server. MegaOptim Cloud is the recommended option when you want smarter compression, further optimization of existing WebP and AVIF images, and less CPU and memory usage on your hosting. The cloud plan is $54 per year for unlimited sites.
-
Can MegaOptim automatically convert uploaded images?
-
Yes. You can enable automatic conversion or automatic compression for newly uploaded images. MegaOptim processes those jobs in the background so new uploads can be handled without manual bulk actions.
-
How are WebP and AVIF images served on the front end?
-
MegaOptim can serve next-gen images through Apache
.htaccessrules or a PHP passthru delivery mode. Both options are designed to serve WebP and AVIF to supported browsers while keeping the original image as a fallback. -
Can I restore my original images?
-
Yes. If you compressed originals with backups enabled, MegaOptim can restore the original image and regenerate thumbnails. You can also remove generated WebP and AVIF derivative files without changing the original upload.
-
Can I process folders outside the Media Library?
-
Yes. MegaOptim 2.0 includes a File System view that lets you browse server folders and bulk-process images outside the WordPress Media Library.
-
Does MegaOptim support WP-CLI?
-
Yes. Current commands include
wp megaoptim convert,wp megaoptim stats,wp megaoptim reset,wp megaoptim log,wp megaoptim queue:process, andwp megaoptim queue:stats. -
What happens when I upgrade from an older MegaOptim version?
-
MegaOptim 2.0 migrates legacy settings and attachment data in the background. If migration is needed, the plugin shows a migration progress banner in the admin area while the old data is being imported into the new 2.0 tables.
Reviews
Contributors & Developers
“MegaOptim Image Optimizer – Optimize WebP & AVIF, Compress Images, Convert to WebP & AVIF” is open source software. The following people have contributed to this plugin.
ContributorsInterested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
2.0.2
- File System view: Convert and Compress now work on folders and single files, with live progress via the shared browser-worker loop (same mechanism as the Media Library bulk flow).
- Fix: Convert no longer drops thumbnail siblings. Every thumbnail size now produces its own
.webp/.avifnext to the source file. - Fix: forced re-convert kept the freshly converted files instead of wiping them at the end of the run.
- Polished folder modal (mode-aware hero, force re-process toggle, cancel-during-run, per-file failure list).
2.0.0
- Complete refactor of the plugin (Vue 3 admin, modern PHP architecture, new conversion engine for WebP/AVIF, File System view, queue monitor, WP-CLI commands).
- Backwards compatible: legacy v1.x mode remains available and existing settings/attachment data are migrated in the background.
