=== ArshadStudio Bulk Image Converter to WebP ===
Contributors: arshadwpdev
Tags: webp, convert, image, optimize, media
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Bulk-convert JPG or PNG images in your Media Library into real WebP files, with an optional toggle to delete the originals after conversion.

== Description ==

ArshadStudio Bulk Image Converter to WebP adds a dashboard screen that walks you through three steps:

1. **Choose a conversion type** — JPG to WebP or PNG to WebP.
2. **Preview the matching images** — the plugin lists every image in your Media Library that matches the selected format, with a thumbnail, filename, and file size.
3. **Convert** — optionally tick "Delete the original after conversion," then start. A live progress bar shows status, and each thumbnail is marked with the percentage saved or a failure flag.

The plugin performs genuine pixel-level re-encoding using the Imagick extension (preferred) or the GD extension — it never simply renames a file extension. Every output file is verified against the WebP binary signature before it is accepted, so you can trust that the result is a real WebP image.

Conversion runs one image per request over AJAX, which avoids PHP execution-time limits on large libraries.

When "delete originals" is enabled, the Media Library attachment is repointed to the new WebP file and its metadata is regenerated, keeping the library consistent.

== Installation ==

1. Upload the `arshadstudio-bulk-image-converter-webp` folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress Plugins screen directly.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Open the "WebP Converter" menu item in your dashboard.

== Frequently Asked Questions ==

= Does this actually re-encode images, or just rename them? =

It performs real conversion. The source pixels are decoded and re-encoded with the WebP codec, then the output is validated against the RIFF/WEBP binary signature. Files that are not genuine WebP images are reported as failed.

= Will my original images be deleted? =

Only if you explicitly check the "Delete the original" option and confirm the warning. By default, originals are kept and a new `.webp` file is created alongside them.

= What does my server need? =

PHP 7.2 or newer, plus either the Imagick extension (with WebP support) or the GD extension with the `imagewebp()` function. The plugin detects this automatically and shows a notice if neither is available.

= Why are converted images not being served to visitors automatically? =

This plugin focuses on conversion. Serving WebP to supported browsers while keeping a fallback is handled separately, for example via server rewrite rules. A future version may add an optional serving layer.

== Screenshots ==

1. Step 1 — choose the conversion type and quality.
2. Step 2 — preview the matching images from the Media Library.
3. Step 3 — convert, with optional deletion of originals and a live progress bar.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
