Optimize uploaded images
Image Optimizer compresses supported WordPress image attachments, limits their longest dimension to 2560 pixels, and creates WebP companions where appropriate. It processes new attachment metadata automatically and provides a separate maintenance screen for existing media.
Enable it under Settings → POM Tweaks → Media → Media library → Image optimizer.
Behavior at a glance
- JPEG, PNG, GIF, AVIF, and WebP attachments can be optimized.
- Images larger than 2560 pixels on their longest side are resized.
- Animated GIFs are optimized without decoding and re-encoding them.
- JPEG, PNG, and AVIF originals and generated sizes receive
.webpcompanions. - Native WebP uploads do not receive a second WebP file.
- The WordPress
medium_large,1536x1536, and2048x2048generated sizes are removed while the module is active. - Uploads with the same base filename as another supported image extension receive a numbered suffix.
The source attachment is replaced only after the optimized temporary file passes a full decoding check. Failed source processing leaves the previous file unchanged, and temporary working files are not retained as a permanent originals archive.
Administration tools
While enabled, Media → Image optimizer provides:
- Optimize missing images for supported attachments not yet marked as optimized;
- Optimize all images to regenerate metadata and process every supported image again;
- a list of the image sizes currently registered on the site.
The Media Library list also gains a Size Savings column for attachments with recorded optimization results.
Read before running a bulk task
- Configure automatic image optimization.
- Understand how source files are replaced.
- Generate and serve WebP companions.
- Optimize the existing media library.
- Troubleshoot failed or incomplete optimization.
Disabling the module stops future processing but does not restore changed files or remove generated WebP companions.