MegaOptim Image Optimizer


MegaOptim is image optimization plugin and that is easy to use, stable and actively maintained by dedicated team of experts. 🙂

The plugin uses minimal resources on your server and all the heavy lifting is done by our API service on our servers. No binaries will be ever installed on your server that will slowdown your site.

We strive to make the plguin as lightweight as possible and will never bloat your dashboard with ads, notifications, upsells or run background services that will cause high CPU usage constantly. The plugin only runs when it’s really necessary.

What is image optimization and why it is important?

Image Optimization is delivering the high-quality images in the right format, dimension, size, and resolution while keeping the smallest possible size.

What features does MegaOptim offer?

  • Bulk optimization for the Media Library, NextGen, MediaPress, etc
  • Bulk optimization of Folders by your choice in your server
  • WP CLI Support for optimization and restore (bulk or single)
  • Uses progressive JPEG format for faster rendering
  • Supports WebP. Creates and serves WebP when possible
  • Supports Sub-accounts support with detailed statistics
  • Supports Backups/Restore + option to configure what to backup
  • Option to select which thumbnails to optimize
  • Option to enable/disable conversion from CMYK to RGB
  • Option to preserve/remove the EXIF/IPTC metadata
  • Option to auto-resize images to given dimensions upon optimization/upload
  • Compatible with WP Retina 2x
  • Compatible with WP Offload Media / Amazon S3
  • Compatible with CloudFlare. Purges image cache upon optimization
  • Compatible with WP 5.3+ BIG Image Threshold feature
  • Compatible with Windows/UNIX hosting environments
  • Compatible with WP Engine, SiteGround and other providers
  • Compatbile with localhost and password protected sites
  • No credits charged if %5 or less is saved per image
  • Multisite Support

How much does MegaOptim cost?

The service comes with 500 FREE images/tokens per month for everyone. We also have unlimited plan at only $9.99. Check our pricing here.

Have a question? Contact us!

We have dedicated support team ready to help you 24/7.

Developer Hooks / CLI

Click here to read more about our WP CLI integration and the actions and filters that are available.


  • Media Library Optimizer
  • Media Library Table List
  • General Settings
  • Advanced Settings
  • Debug Page
  • NextGen Library Optimizer
  • Media Library Single Attachment Page
  • WP CLI - All commands
  • WP CLI - Bulk Optimize command
  • WP CLI - Bulk Restore command


1.) Sign up for api key at
2.) You will receive your API key in the email address you provided.
3.) Upload the MegaOptim plugin to /wp-content/plugins or install it via the wp-admin interface, finally activate it.
4.) Navigate to wp-admin and in the sidebar menu click on “MegaOptim”, hover over and go to “Settings”, here you can paste the api key and save the settings.
5.) In the same section check the other settings, change them according to your needs.
6.) You are all set! Begin optimizing by navigating to “MegaOptim” > “Optimizer” ( In the top right corner you can select optimizer )


What is API token?

One API token is one image. Please note that WordPress generates multiple thumbnails per one image. You will be charged one token for each thumbnail. If the total saved size per image is less than %5 you will not be charged.

Can i use the same API Key on multiple websites?

Absolutely. You can use your API key on as many websites as you want or you can also create sub accounts for each of the sites you manage if you want to keep the things separate or bill your clients separate.

Do you offer CDN?

No, but our plugin integrates with WP Offload Media and that way you can easily use Amazon S3 bucket as your CDN which is much cheaper than actual CDN service.

Is the plugin compatible with WP Offload Media?

Yes. If you have configured WP Offload Media no further configurations are needed, the images will be automatically optimized and offloaded to your S3 bucket.

How the WebP feature works?

The WebP versions are free of charge and our API service will create optimized WebP for each image upon optimization and store it in your storage. If you enable Front-End delivery the content will be re-written and if .webp version exist for specific image it will be used instead.

Can i backup and restore the images?

Yes, MegaOptim have option to backup the images and it is enabled by default. You can alawys restore the original images if there is backup.

Can i manage multiple sites separately with sub-accounts?

Sure! You can create sub-account for your client and transfer tokens to the sub-account balance. This way your client will have separate account and api key and you will be managing it. You have the option to add or remove api tokens from it.

Is WP CLI (command line) supported?

Sure! You can optimize and restore images from the command line using WP CLI. Please see this guide for more information.

Is this plugin heavy for my site?

The plugin optimizes images on our external servers and does not run anything on your own servers that may cause slowndowns. In addition it only runs when you start bulk process or if you upload image via Media Library to autoamatically optimize it. It’s not active in background unlike some other plugins.

I used ShortPixel, Imagify and other plugins. Will your plugin reduce the images size further more?

In most cases yes! The plugin will make attempt to optimize the image further. If the saved size result is less or equal to 5% no token will be charged!

What happens if i stop using or deactivate MegaOptim plugin?

Nothing, your images will remain optimized, if you used the WebP feature the site won’t serve WebP any longer.

What are the pricing packages?

We do both one-time and monthly. Please check out here.

Can i cancel my subscription?

Absolutely! You can cancel your subscription whenever you want.

Do you have an API?

Yes, please check out here for more documentation. Need to optimize images in your custom projects? You can even use our PHP Library via composer.

Will MegaOptim work with CloudFlare?

Yes! You need to use the CloudFlare plugin with correct credentials or setup credentials in the Settings > Advanced menu. If the credentials are setup correctly, the plugin will automatically purge from the CloudFlare cached images when they are optimized with MegaOptim.

Do you have referral program?

Sure! Help us spread MegaOptim and earn 120 tokens per sign up and 300 tokens once customer becomes paid customer. Our Referral program can be found in the dashboard area.

I have problem, the plugin won’t work.

Before anything, please contact us as soon as possible and we can assist you. We even have a live chat on our site.


June 17, 2020
I have been using megaoptim for 2 months now, and I am totally satisfied. Its easy to use, full of features, fast and the price is more than fine. I´ve tested several plugins and by far this one is the best. I reccommend it. Some pros and cons I found after some months of usage. Pros: It lets you optimize images via SSH with wp-cli It reduces the filesize of images up to 70% with lossless setting. Fast support Several ways of interacting with the plugin (WordPress admin, wp-cli, php library, python library, django library and some others). Good Price Cons: Maybe its not as fast as others image optimization plugins, but it does a very well job. If you are looking for a plugin to reduce the images filesize to optimize the speed load, and also to reduce space on your server/hosting, you can go with Megaoptim. its just Amazing.
March 29, 2020
This is a must have plugin for image optimization, it's very simple, easy to use and has a lot of features. Also it is not bloated with unnecessary things and ads. The support team is very responsive as well.
November 11, 2019
Switched from other image optimization plugins. The plugin has similar (if not better) compression rates, lots of functionality and much cheaper than the alternatives. Great work!
October 16, 2019
Very easy to use and also very affordable if you use paid plan. Support is also very quick! I recommend!
March 17, 2019
Excellent plugin! Since it is brand new, i wanted to give it a try and i am quite impressed with the results. I optimized around 8000 images and saved about 2.2GB in total. I recommend this plugin and installing it on other sites i maintain!
Read all 5 reviews

Contributors & Developers

“MegaOptim Image Optimizer” is open source software. The following people have contributed to this plugin.




  • Fix broken WebP images when both file.png.webp and file.webp exists on the server
  • Improved WebP settings UI/UX
  • Tested on WordPress 5.4


  • Added chunked Media Library scanning for large media libraries to prevent memory exhaustion and timeouts
  • Added error reporting for cases when there is fatal error during bulk optimization caused by third party. eg: plugin updates, etc.
  • Improved Bulk Optimizer counters
  • Improved WPCLI Bulk Optimizer command
  • Improved Bulk Folder/File Optimizer
  • Improved Bulk Media Library Optimizer
  • Improved Bulk NextGen Library Optimizer
  • Improved UI out-of-tokens signalization
  • Fixed notice title conflicts
  • Fixed several typos


  • Fix WebP php warning


  • Added scan filters
  • Improved Bulk Optimizer UI (Added confirmation on exit and Cancel button)
  • Improved WebP/WP Media Offload support: Detect if WebP image exist on the remote s3 bucket use it in the final markup
  • Improved WebP/WP Media Offload support: Added support for installs that use CNAME to mask the s3 bucket url.
  • Improved readme


  • Added compatibility for WP 5.3 “BIG Image” threshold. If Auto-Optimize is enabled AND Max Width/Height are set in the options, disable the “BIG Image” treshold
  • Fix the auto resize width/height option (was not working correctly)
  • Improved Media library table rendering
  • Improved logging function. Automatically remove log files bigger than 10 MB


  • Added WP Offload Media (Lite/Pro) support
  • Improved WebP support


  • Added file/directory support to wp megaoptim optimize command. You can now optimize files and folders by specifying path.
  • Improved file optimizer
  • Improved UI


  • Compatibility with WordPress 5.3
  • Improved image URL validation functionality
  • Improved public site detection functionality.


  • Added support for l18n standard
  • Added notice to suggest to the user to switch to list mode in the Media Library screen
  • Improved the welcome instructions screen
  • Updated usage message for wp megaoptim restore command to match the command
  • Refactored ajax security checks and added some more security hardening (thanks pluginvulnerabilities for the suggestions)
  • Added improved error reporting in the Media Library list mode


  • Added WP CLI command for optimizing images eg. wp megaoptim optimize <ID> [--force] [--level=<option>]
  • Added WP CLI command for restoring images eg. wp megaoptim restore <IDorAll>
  • Added WP CLI command for setting api key. eg. wp megaoptim set_api_key <api_key>
  • Added WP CLI command for querying api tokens eg. wp megaoptim info
  • Security Improvements


  • Add detection to skip corrupted/unoptimized files in some unique cases of environments
  • Force HTTP 1.1 for now because of problems with some web servers.


  • Fix svn problem


  • Added Support for the Unlimited plan
  • Added Support for sub accounts
  • Revamped media library optimizer
  • Revamped nextgen library optimizer
  • Revamped retina support & WP Retina @2x integration
  • Improved optimization speed by at least 50%
  • Improved WebP support
  • Improved Settings pages
  • Improved WPEngine compatibility
  • Fixed Cloudflare purge compatibility
  • Fixed problem when auto-optimizing nextgen gallery images
  • Improved stats display when optimizing single attachment in Media Library table
  • Added detection for the child theme folder in ‘Local Folders’ optimizer
  • Fixed several typos


  • Improved Admin pages
  • Improved WebP support


  • Added WebP Support
  • Removed MegaOptim from main menu and added the settings part in “Settings” and the optimizer in “Media” tabs.
  • Improved settings data persistence
  • Improved security
  • Improved Admin UI
  • Fixed PHP Strict Standards warning
  • Fixed saving max dimensions value
  • Revamped database upgrade process