ImgOptimizer & PNG to JPG
ImgOptimizer & PNG to JPG
Description
ImgOptimizer & PNG to JPG helps you reduce Media Library image sizes without changing image attachment IDs.
- Process JPEG and PNG images in batches.
- Resize images that exceed configured dimensions.
- Recompress JPEG images at a configurable quality.
- Recompress PNG images while preserving transparency.
- Convert PNGs to JPEG only when no transparency is detected.
- Process a single image or selected Media Library images.
- Optionally process new image uploads.
- Roll back any processed image to its original file, individually or in bulk.
PNG-to-JPG conversion changes the image URL extension. Keep the original PNG until you have checked affected pages, especially when a page builder stores image URLs in custom data.
License
This plugin is licensed under the GPL-2.0-or-later license.
Installation
- Upload the plugin ZIP through Plugins > Add New > Upload Plugin.
- Activate the plugin.
- Go to ImgOptimizer & PNG to JPG in the admin menu to configure settings and process images.
Faq
No. JPG cannot preserve transparency, so the plugin skips PNGs where transparency is detected. Since 1.1.32 every pixel is checked (fully and partly transparent pixels, alpha channels and palette/tRNS transparency), and a PNG that cannot be inspected is kept as PNG. Developers can override detection with the imgopnto_png_has_transparency filter.
Yes. Images processed with 1.1.31 or later (with “Rollback backups” enabled) can be restored from the Media Library or the plugin page. Images processed by earlier versions have no backup and cannot be rolled back.
No, not by default. Enable that option only after verifying your site uses the new JPG URLs correctly.
Reviews
Changelog
1.1.32
- Fixed: Transparent PNGs could be converted to JPG even with “Convert PNG to JPG only when it has no transparency” checked.
- Fixed: Fully transparent pixels (e.g. transparent backgrounds) are now detected; the Imagick check only caught semi-transparent pixels.
- Fixed: Transparency in 8-bit palette PNGs (tRNS chunk) is now detected with GD.
- Fixed: Large PNGs are scanned completely instead of sampling every 8th pixel, so thin transparent edges are no longer missed.
- Fixed: PNGs that cannot be inspected are kept as PNG instead of being converted.
- New: Fast PNG header check skips the pixel scan for PNGs that cannot contain transparency.
- New: Processing log shows “PNG kept (transparency detected)” for PNGs that were not converted.
- New:
imgopnto_png_has_transparencyfilter. - Changed: Plugin page split into tabs: Bulk Optimize, Rollback, Settings and Patch Notes.
- Changed: “Settings saved” notice after saving, and you return to the Settings tab.
1.1.31
- New: Rollback. Originals are backed up (wp-content/uploads/imgopnto-backups/) before an image is changed.
- New: “Restore original” row action and attachment-details button for individual images.
- New: “Restore originals” Media Library bulk action and “Restore All Originals” batch on the plugin page.
- New: Rollback reverses PNG JPG conversions, including the attachment path, MIME type, thumbnails and updated content references.
- New: “Delete All Backups” button and a setting to turn backups off.
- Changed: Plugin, page, menu and notice titles renamed to “ImgOptimizer PNG to JPG”.
- Changed: The plugin now has its own top-level “ImgOptimizer PNG to JPG” admin menu (old Tools URL redirects).
1.1.3
- Declare compatibility with WordPress 7.1.1.
- Align the plugin name and text domain with the plugin slug.
1.1.2
- Enqueue admin JavaScript and CSS through WordPress APIs.
- Use uniquely prefixed plugin identifiers.
- Prevent duplicate automatic-processing jobs during metadata regeneration.