=== Sali Media Optimizer ===
Contributors: ghasali
Tags: webp-converter, webm-converter, media-converter, image-optimizer, video-converter
Requires at least: 5.6
Tested up to: 7.1
Stable tag: 1.1.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WebP converter, WebM converter & media converter to automatically optimize image uploads to WebP/AVIF and video uploads to WebM.

== Description ==

Sali Media Optimizer is a lightweight, all-in-one media converter and compression plugin. Acting as a high-performance WebP converter and WebM converter, it automatically converts image uploads to WebP or AVIF, and video uploads to WebM. It reduces file sizes by up to 80% with zero visible quality loss, optimizing your WordPress media library for speed and SEO.

= Key Features =
* **Automatic Conversion:** Converts newly uploaded images to WebP/AVIF and video uploads (MP4/MOV/AVI) to WebM.
* **Auto-Resize on Upload:** Set maximum dimensions (e.g. 2048px) to automatically downscale huge camera images before compression.
* **Performance Benchmark:** Diagnostic benchmark tool to measure local compression speeds of PHP GD, Imagick, and cloud fallback.
* **CDN URL Rewriter:** Rewrite frontend asset domains to bunnycdn, cloudflare, or bunny.net.
* **Smart HTML Fallback:** Rewrites HTML tags to use `<picture>` falling back to original JPG/PNG files on older browsers.
* **Background WP-Cron Sync:** Bulk optimize your pre-existing media assets periodically in the background.

== Installation ==

1. Upload the `sali-media-optimizer` folder to the `/wp-content/plugins/` directory, or search for "Sali Media Optimizer" in plugins screen and install.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Navigate to the "Sali Media" menu in your WordPress dashboard to configure the settings.

== Frequently Asked Questions ==

= Does it backup original files? =
Yes, if enabled, the plugin keeps original uploads intact by adding a `.original` suffix. You can restore them individually or in bulk at any time.

= What are the PHP requirements? =
It requires PHP 7.4 or later and optionally PHP-GD, Imagick or FFmpeg extension on your server. If missing, it will automatically fallback to the cloud API.

== Changelog ==

= 1.1.1 =
* Added in-dashboard comprehensive English documentation.
* Added SVG pipeline and CDN flow diagrams.

= 1.1.0 =
* Renamed sidebar menu to "Sali Media" for a cleaner fit.
* Added settings and documentation submenu tabs.

= 1.0.2 =
* Implemented image resizing and CDN rewrite filters.

== External services ==

This plugin uses the reSmush.it external service for cloud-based image optimization when local tools (GD or Imagick) are unavailable or disabled.

* **Service Description:** reSmush.it is a free cloud image optimization service used here to compress and optimize images.
* **Data Transmitted:** When local optimization fails or is not supported, the plugin transmits the raw image file and compression quality setting to the reSmush.it API.
* **Service Terms & Privacy:**
    * Service URL: [https://resmush.it](https://resmush.it)
    * Terms of Service: [https://resmush.it/terms](https://resmush.it/terms)
    * Privacy Policy: [https://resmush.it/privacy](https://resmush.it/privacy)
