=== OneTap WebP Converter ===
Contributors: samiattari33
Tags: webp, image optimization, media library, convert images, performance
Requires at least: 5.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Convert all existing JPG/PNG images in your Media Library to WebP with a single click, in place, with no duplicates.

== Description ==

OneTap WebP Converter scans your WordPress Media Library and converts every JPG/PNG attachment — including all registered thumbnail sizes — to the modern WebP format. Unlike plugins that keep both the original and a WebP copy, this plugin replaces the file in place, so your Media Library stays clean and your storage usage doesn't grow.

**Key Features**

* One-tap bulk conversion of all JPG/PNG images already in your Media Library
* Converts every registered image size (thumbnail, medium, large, custom sizes), not just the full-size file
* Uses Imagick or GD, whichever is available on your server
* Adjustable WebP quality (1–100)
* Optional backup of original files before conversion (`.orig` copies), with a one-click Restore option
* Optional automatic rewriting of image URLs inside your post/page content
* Batched AJAX processing with a live progress bar and log, so large libraries don't time out
* Live Media Library stats: total images, JPG/JPEG count, PNG count, and images already in WebP

**Important — please read before use**

This plugin modifies files on disk. If the backup option is disabled, original JPG/PNG files are permanently deleted after conversion. We strongly recommend:

1. Taking a full site backup before running a bulk conversion.
2. Keeping the "Backup originals" option enabled (it is enabled by default) so you can restore files if needed.
3. Testing on a staging site first if possible.

**Server Requirements**

Your server needs either the Imagick PHP extension (with WebP support) or the GD extension (with WebP support). If neither is available, the plugin will still activate and show a clear admin notice explaining the requirement.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/onetap-webp-converter` directory, or install the plugin directly through the WordPress "Plugins > Add New" screen.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Go to Settings > OneTap WebP Converter to review your Media Library status and configure quality/backup options.
4. Click "Convert All Images to WebP" to start the bulk conversion.

== Frequently Asked Questions ==

= Will this delete my original images? =

If the "Backup originals" setting is enabled (the default), a `.orig` copy of each original file is kept and can be restored later with the "Restore Originals" button. If backup is disabled, originals are permanently deleted after a successful conversion.

= What happens to image URLs already used in my posts? =

If "Rewrite post content" is enabled (the default), the plugin searches your post/page content for the old JPG/PNG URLs and replaces them with the new WebP URLs. URLs stored elsewhere (widgets, theme options, custom fields, some page builders) are not automatically updated.

= What if my server doesn't support WebP? =

The plugin checks for Imagick or GD with WebP support. If neither is available, an admin notice is shown with clear instructions. The plugin will still activate.

= Does this create duplicate files? =

No. The original file is replaced by the WebP file at the same path (with the `.webp` extension), so your Media Library does not end up with duplicate entries per image.

== Screenshots ==

1. Media Library status and conversion panel.
2. Conversion in progress with live log and progress bar.
3. Plugin settings: quality, backup, and content rewrite options.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
