=== JGWS Media Optimizer ===
Tags: webp, image optimization, image conversion, media library, performance
Requires at least: 5.8
Tested up to: 7.1
Stable tag: 1.5.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatically converts newly uploaded JPG and JPEG images to WebP during the WordPress Media Library upload process.

== Description ==

JGWS Media Optimizer automatically converts newly uploaded JPG and JPEG images to WebP during the WordPress media upload process.

The plugin uses WordPress image processing mechanisms instead of replacing the standard Media Library workflow.

WebP images can reduce file size while maintaining good image quality, which can help reduce storage usage and improve page loading performance.

The FREE version is designed to work automatically after installation, without requiring an external image optimization service.

== Features ==

* Automatic conversion of newly uploaded JPG and JPEG images to WebP.
* WordPress-generated image sizes are also created in WebP format.
* Default WebP quality of 85.
* Optional preservation of the original JPG/JPEG file.
* Preserved original JPG/JPEG files are added as separate attachments to the Media Library.
* Preserved original JPG/JPEG files remain available independently from the WebP attachment.
* PDF preview images generated by WordPress are not converted to WebP.
* Uses WordPress native image processing APIs.
* No external image optimization service is required.

== FREE and PRO ==

The FREE version provides automatic JPG/JPEG to WebP conversion with a fixed WebP quality of 85.

JGWS Media Optimizer PRO extends the FREE version with additional formats, greater control over the conversion process, and additional Media Library features.

The PRO version includes:

* Configurable WebP quality from 1 to 100.
* PNG to WebP conversion.
* Separate conversion settings for JPG/JPEG and PNG.
* Lossless PNG to WebP conversion.
* Optional preservation of original PNG files.
* Additional options for working with original image files.
* Clear file format labels in the Media Library, making it easier to identify formats and work with media files.

For more information about the PRO version:

https://jgwebstudio.pl/wtyczki-wordpress/jgws-media-optimizer/

== How It Works ==

When a JPG or JPEG image is uploaded to the WordPress Media Library, JGWS Media Optimizer allows WordPress to generate the image and its registered sizes.

The resulting JPEG output is converted to WebP through the WordPress image editor system.

The FREE version uses a fixed WebP quality of 85.

By default, the original JPG/JPEG file is removed after a successful conversion.

If the option to preserve the original file is enabled, the JPG/JPEG file is kept as a separate attachment in the Media Library.

== Settings ==

The FREE version provides the following setting:

* Keep original JPG/JPEG files – keeps the original JPG/JPEG file as a separate Media Library attachment.

WebP quality is fixed at 85 in the FREE version.

== Installation ==

1. Upload the `jgws-media-optimizer` folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress Plugins screen.
2. Activate the plugin through the Plugins screen in WordPress.
3. Go to **JGWS Optimizer** in the WordPress admin menu.
4. If required, enable the option to keep original JPG/JPEG files.
5. Upload a JPG or JPEG image to the Media Library.

The conversion is performed automatically during the upload process.

== Frequently Asked Questions ==

= Which image formats are supported? =

The FREE version converts JPG and JPEG images to WebP.

= Are PNG images converted? =

No. PNG to WebP conversion is available in the PRO version.

= Are GIF images converted? =

No. GIF images are not converted by the current version of the plugin.

= What is the WebP quality in the FREE version? =

The FREE version uses a fixed WebP quality of 85.

= Can I change the WebP quality? =

The FREE version uses a fixed quality of 85.

Configurable WebP quality from 1 to 100 is available in the PRO version.

= What happens to the original JPG/JPEG file? =

By default, the original JPG/JPEG file is removed after a successful conversion.

You can enable the option to keep the original file as a separate Media Library attachment.

= Does the plugin require an external image optimization service? =

No. The plugin uses image processing mechanisms available in WordPress and on the server.

= Are PDF preview images converted? =

No. JPEG preview images generated by WordPress for PDF files are excluded from the conversion process.

= Does the plugin modify the WordPress Media Library? =

The plugin uses the standard WordPress Media Library and image processing system.

When original JPG/JPEG files are preserved, they are added as separate Media Library attachments.

= What does the PRO version add? =

JGWS Media Optimizer PRO adds configurable WebP quality, PNG to WebP conversion, separate conversion settings for JPG/JPEG and PNG, lossless PNG conversion, optional preservation of original PNG files, and clear file format labels in the Media Library.

== Changelog ==

= 1.5.0 =
* Improved handling of preserved original JPG/JPEG files.
* Preserved original JPG/JPEG files are created as separate Media Library attachments.
* Improved Media Library refresh after preserved original JPG/JPEG attachments are created.
* Improved handling of multiple image uploads.
* Added protection for preserved original JPG/JPEG files when the related WebP attachment is deleted.
* Improved handling of WordPress-generated PDF preview images.
* Set the default WebP quality to 85.
* Added the option to preserve original JPG/JPEG files.
* Added information about the PRO version.

== Upgrade Notice ==

= 1.5.0 =
This version improves handling of preserved original JPG/JPEG files, Media Library refresh, multiple image uploads, and PDF preview images.

The FREE version uses a fixed WebP quality of 85. Configurable WebP quality and additional image conversion formats and features are available in JGWS Media Optimizer PRO.