=== WP Media Compress ===
Contributors: hubert-m
Tags: image optimization, webp, avif, compression, media library, performace, pagespeed
Requires at least: 6.0
Tested up to: 6.9.4
Stable tag: 1.0.0
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automated image optimization for WordPress. Boost your PageSpeed scores by serving WebP and AVIF images with intelligent background processing.

== Description ==

**WP Media Compress** is a high-performance image optimization plugin designed to make your WordPress site faster without compromising image quality. By leveraging modern image formats like **WebP** and **AVIF**, it significantly reduces file sizes, leading to faster load times and better SEO rankings.

Unlike other plugins that might slow down your admin dashboard, WP Media Compress utilizes **WP-Cron** for background processing. Your images are optimized in the background while you continue working on your content.

### Key Features

*   **Next-Gen Formats:** Automatically convert your images to WebP or AVIF (the current industry standard for efficiency).
*   **Intelligent Fallbacks:** If a server doesn't support AVIF, the plugin automatically falls back to WebP or the original format.
*   **Smart Resizing:** Automatically downscale massive uploads to a manageable maximum width or height.
*   **Quality Control:** Fine-tune the compression level to find the perfect balance between quality and file size.
*   **Background Processing:** Optimization tasks run in the background via WP-Cron to ensure a smooth user experience.
*   **Automatic Frontend Replacement:** Your site will automatically serve optimized versions of your images to visitors.
*   **Efficiency Safeguard:** If an optimized file is larger than the original, the plugin intelligently reverts to the original.
*   **Detailed Analytics:** View compression stats (savings, dimensions, mime-types) directly in the WordPress Media Library.
*   **Server Environment Check:** Built-in tool to verify your server's support for modern image libraries (GD/Imagick).
*   **Bulk Reprocessing:** Reprocess your entire media library with a single click.

== Installation ==

1. Upload the `wp-media-compress-plugin` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to **Settings > Media Compress** to configure your optimization preferences.
4. (Optional) Visit the **Server Check** tab to ensure your host supports WebP and AVIF.

== Frequently Asked Questions ==

= Does this plugin modify my original images? =

No. The plugin creates optimized copies and keeps your original files intact. The frontend URLs are then rewritten to point to the optimized versions.

= What happens if I deactivate the plugin? =

Your site will simply revert to showing the original images. The optimized files remain on your server but won't be served.

= Why are some images not being converted to AVIF? =

AVIF support requires PHP 8.1+ and a recent version of ImageMagick or GD with AVIF support. Check the **Server Check** tab in the plugin settings to see your server's capabilities.

= Does it support bulk optimization? =

Yes! You can use the **Bulk Reprocess** tool in the settings page to optimize all images currently in your Media Library.

== Screenshots ==

1. **Settings Page:** Configure max dimensions, quality, and output formats.
2. **Server Check:** Detailed information about your server's image processing capabilities.
3. **Media Library Integration:** Detailed compression stats for each image.
4. **Debug Logs:** Keep track of every optimization task.

== Changelog ==

= 1.0.0 =
*   Initial release.
*   Support for WebP and AVIF.
*   Background processing via WP-Cron.
*   Media Library integration and stats.
*   Bulk reprocessing tool.

== Upgrade Notice ==

= 1.0.0 =
Initial version. Install now to start optimizing your media library.
