=== ImgOptimizer & PNG to JPG ===
Contributors: johnb12341
Tags: image optimization, png to jpg, image compression, jpeg optimization, media library
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.31
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Bulk optimize WordPress images: resize and compress JPG/PNG files, and convert non-transparent PNGs 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.

== Installation ==

1. Upload the plugin ZIP through **Plugins > Add New > Upload Plugin**.
2. Activate the plugin.
3. Go to **ImgOptimizer & PNG to JPG** in the admin menu to configure settings and process images.

== Frequently Asked Questions ==

= Are transparent PNGs converted to JPG? =

No. JPG cannot preserve transparency, so the plugin skips PNGs where transparency is detected.

= Can I undo an optimization? =

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.

= Does the plugin delete the original PNG? =

No, not by default. Enable that option only after verifying your site uses the new JPG URLs correctly.

== Changelog ==

= 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.

== Upgrade Notice ==

= 1.1.31 =
Adds rollback: originals are backed up before changes and can be restored per image or in bulk. The plugin now has its own admin menu.

== License ==

This plugin is licensed under the GPL-2.0-or-later license.
