=== Upload Converter for WebP ===
Contributors: ronybormon  
Donate link: https://ronybormon.com/ 
Tags: webp, image optimization, bulk converter, jpg to webp, png to webp  
Requires at least: 5.2  
Tested up to: 6.8  
Requires PHP: 7.2  
Stable tag: 1.0  
License: GPLv2 or later  
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Convert JPG, JPEG, and PNG images to WebP automatically or manually with bulk actions and Media Library buttons.

== Description ==

**Upload Converter for WebP** is a powerful WordPress plugin that automatically converts uploaded JPG, JPEG, and PNG images to modern WebP format for faster load times and better optimization. You can also convert existing images manually with one click from the Media Library or the plugin’s admin panel.

🎯 **Features**:

- ✅ Automatic conversion to WebP during upload
- ✅ Convert existing images from the admin dashboard
- ✅ Media Library support:
  - List View: Action link to convert
- ✅ Fullscreen lightbox preview with file info
- ✅ Built using native WordPress functions (Imagick or GD)
- ✅ Lightweight and cleanly coded for performance

== Installation ==

1. Upload the plugin folder to the `/wp-content/plugins/` directory or install via the Plugins screen in WordPress.
2. Activate the plugin through the ‘Plugins’ screen.
3. After activation, go to **Dashboard → WebP Converter** or use the Media Library for manual conversions.

== How to Use ==

This plugin automatically converts images to WebP format during upload. You don't need to do anything manually after installation.

= 🔄 Automatic Conversion (On Upload) =

- After activation, when you upload a JPG or PNG image to the Media Library, it will be automatically converted to WebP.
- The converted image will be smaller in size, helping improve site speed and performance.

= 🛠️ Convert Existing Images =

== Option 1: From Media Library (List View) ==

1. Go to **Dashboard → Media → Library**.
2. Switch to **List View**.
3. Select one or more JPG/PNG images.
4. From the **Bulk Actions** dropdown, choose **Convert to WebP**.
5. Click **Apply**.

== Option 2: From Plugin Page ==

1. Go to **Dashboard → WebP Converter** (menu added by the plugin).
2. You'll see a list of all JPG and PNG images.
3. Select the images you want to convert.
4. Click on **Convert Selected**.  
   ✅ After conversion, you’ll see the message:  
   `Converted to WebP successfully.`

== Notes ==

- Only JPG and PNG images are supported.
- Make sure your server supports WebP and the `imagewebp` extension in PHP.
- If you get an error like “An error occurred in the upload”, check:
  - If the file type is supported
  - If PHP GD/WebP is enabled
  - File permissions are correct

== FAQ ==

= Will it slow down uploads? =  
There is a minimal delay if automatic conversion is enabled, depending on image size and your server.

= What if Imagick or GD is not available? =  
The plugin checks for both. If neither is available, a helpful error is shown.

== Changelog ==

= 1.0 =

- Initial release with full automatic and manual WebP conversion support.

== Links ==

- Author: [Rony Bormon](https://www.linkedin.com/in/rony-bormon)
- Website: [https://ronybormon.com/](https://ronybormon.com/)
