=== Image Compressor Now ===
Contributors: imagecompressornow
Tags: image compression, webp, avif, optimize images, compress images
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Free image compression for your Media Library with WebP and AVIF versions. It runs in your own browser: no API key, no credits, no account.

== Description ==

**Image Compressor Now** shrinks the images in your WordPress Media Library and creates WebP (and optionally AVIF) versions for faster pages. It is free, with no limits on the number of images.

Most image plugins either need server libraries that many hosts do not provide, or send your pictures to a paid service that counts "credits". This plugin does the work in **your browser**, using the same WebAssembly engine as [imagecompressornow.com](https://imagecompressornow.com/) (MozJPEG, libwebp, OxiPNG and AVIF). Your images are only ever sent to your own website.

= What it does =

* **Compresses JPEG, PNG and WebP** images, including every thumbnail size WordPress generated.
* **Creates WebP and AVIF versions** next to each image and shows them to visitors whose browser supports them. Everyone else keeps getting the original.
* **Optimizes new uploads automatically** while you are in the admin area.
* **Bulk optimizes your existing library** with a progress bar.
* **Removes metadata** such as camera model and GPS location from optimized files.
* **Optionally scales down very large images** (default: 2560 px wide).
* **Backs up every original** and can restore any image, or all of them, at any time.
* Leaves **animated images** (animated WebP and APNG) untouched.

= How it works =

When there are images to optimize, the plugin downloads each file into your browser, compresses it with WebAssembly in a background worker, and uploads the smaller file back to your own site through the WordPress REST API. This is why **you need to keep the browser tab open** while a bulk run is in progress.

= Good to know =

* Compression happens in the browser of the person who is logged in to the admin area. Images uploaded by FTP, WP-CLI or the REST API are optimized the next time an administrator opens the admin area.
* The WebP/AVIF versions are delivered with the standard HTML `<picture>` element. Some themes style images with very specific CSS selectors; if an image looks different, turn off "Show them to visitors" in the settings.
* Very large images (above roughly 100 megapixels) are skipped, and AVIF versions are skipped above about 40 megapixels, because browsers run out of memory.

= Privacy =

This plugin does **not** connect to any external service and does not collect data. All files used by the plugin, including the WebAssembly encoders, are included in the plugin and loaded from your own site. A settings entry and the optimization status of each image are stored in your database.

= Third-party code =

The plugin bundles WebAssembly builds of open-source encoders: MozJPEG (IJG, BSD-3-Clause and zlib licenses), libwebp (BSD-3-Clause), libavif and libaom (BSD-2-Clause), OxiPNG (MIT) and the jSquash/Squoosh packaging (Apache-2.0). Their source code is public; see `assets/vendor/README.txt` in the plugin for links and licenses.

== Installation ==

1. Upload the `image-compressor-now` folder to `/wp-content/plugins/`, or install the ZIP under Plugins > Add New > Upload Plugin.
2. Activate the plugin.
3. Go to Media > Image Compressor Now and press "Optimize all images". Keep the tab open until it finishes.

== Frequently Asked Questions ==

= Is it really free? =

Yes. There are no credits, quotas or paid tiers, and the plugin does not depend on a paid service.

= Are my images uploaded to another company? =

No. Images are compressed in your browser and saved back to your own website only.

= Do I need to keep the page open? =

Yes, while a bulk run is working. You can press Stop and continue later; images already done stay done.

= Can I undo it? =

Yes. With "Keep a copy of every original" turned on (the default), every image can be restored from the Media Library list or from the settings page.

= Does it change the URLs of my images? =

No. Optimized files replace the originals at the same address. WebP and AVIF versions are stored beside them (for example `photo.jpg.webp`).

= Will it work with a CDN or an offload plugin? =

Files that are not stored on this server (for example in cloud storage) are skipped. A CDN that pulls images from your site works; purge its cache after a bulk run.

= Why is a modern format not created for some images? =

A WebP or AVIF version is only kept when it is smaller than the optimized original.

== Changelog ==

= 0.1.0 =
* First public beta.
