BACK TO DIRECTORY

MegaOptim Image Optimizer – Convert to WebP & AVIF, Compress Images Locally

by MegaOptim

5.0
(34 ratings)

MegaOptim optimizes the images of your WordPress site on your own server. It creates WebP and AVIF copies of your JPEG, PNG and GIF images, serves them to browsers that support them, and can compress the originals in place. Nothing is uploaded anywhere, and there are no monthly limits.

What it does

  • WebP and AVIF copies of every image and thumbnail size, kept next to the original. A copy that would be larger than the original is skipped.
  • Delivery through <picture> markup or Apache/LiteSpeed rewrite rules, with the original as the fallback for older browsers. A CDN URL can be set for the copies.
  • Compression in place for JPEG and PNG, with three presets: Lossless, Balanced and Smaller files. Advanced settings hold separate WebP and AVIF quality, resizing of large uploads, metadata and the thumbnail sizes to process.
  • Backups and restore. Originals are backed up before they are changed, and any image can be restored, one at a time or all at once.
  • Bulk optimization of the whole Media Library with one button. It runs in the background, survives closing the page, and shows its progress on the Overview and in Activity.
  • New uploads are optimized automatically.
  • Folders outside the Media Library, such as theme or plugin image folders.
  • Compare an original with its optimized version side by side.
  • WP-CLI: wp megaoptim optimize, restore, status and stats.
  • Diagnostics that show which image engines your server offers and what each one can do.

How images are processed

MegaOptim uses what your server already has: the GD or Imagick PHP extensions, and command-line encoders such as cwebp, avifenc, jpegtran, pngquant, oxipng or gifsicle when your host has them installed. The plugin itself contains no executables. AVIF needs GD or Imagick built with AVIF support, or avifenc. Tools Server diagnostics shows what is available on your server.

MegaOptim Pro

MegaOptim Pro is an optional add-on. It brings its own native engine for Linux (MozJPEG, libwebp, libavif, oxipng, pngquant, gifsicle), which compresses noticeably better than GD or Imagick and turns animated GIFs into animated WebP. Its smart quality picks the lowest quality for each image that still looks the same, measured with SSIMULACRA 2. Pro also optimizes media offloaded to S3-compatible storage with S3 Uploads or WP Offload Media, and adds parallel WP-CLI and network-wide tools for multisite. Images are still processed on your server.

Source code

The admin screens are a Vue application. Its source is included in the plugin’s admin folder and is built with bun install && bun run build.

Screenshots

Overview: library coverage, space saved and one button to optimize the whole library.

Overview: library coverage, space saved and one button to optimize the whole library.

Images: every image with its savings and formats, filterable by status and source.

Images: every image with its savings and formats, filterable by status and source.

Compare an original with its optimized version.

Compare an original with its optimized version.

Settings: a quality preset, the formats to create and optimization of new uploads.

Settings: a quality preset, the formats to create and optimization of new uploads.

Advanced settings: WebP and AVIF quality, resizing and metadata.

Advanced settings: WebP and AVIF quality, resizing and metadata.

Activity: background work as it happens.

Activity: background work as it happens.

Tools and diagnostics: restore everything, and see what your server can do.

Tools and diagnostics: restore everything, and see what your server can do.

Plugin Details

Active Installs
100
Total Downloads
14,218
Version
3.0.0
Requires WP
5.8
Requires PHP
7.4
Tested Up To
7.1.4
Added
2018-10-05
Last Updated
2026-10-15 12:28pm GMT

Ratings

5
34
4
0
3
0
2
0
1
0