=== Converter Studio – AVIF, WebP & HEIC Converter ===
Contributors: converterstudio
Tags: avif, heic, webp, image compression, image optimization
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Convert images to AVIF or WebP, compress JPEG and PNG originals, turn HEIC photos into JPEGs: in your browser, on your server or in the free app.

== Description ==

[Converter Studio](https://converter.studio) fixes the files that cause trouble on the web. The work is done in your browser, on your own web server with its image library, or by the free Converter Studio desktop app on your computer. The plugin itself has no quota, needs no account and makes no request to any other server: unlike optimisation plugins that send your images to a paid service, nothing is uploaded anywhere and nothing is counted. The optional desktop app has its own free limits (see below).

**AVIF or WebP for your whole Media Library**

* Converts the full size and every sub-size of each image, for the images already in your library and for new uploads.
* Stores the copies next to the originals (photo-300x200.jpg gets photo-300x200.jpg.avif). Making copies never changes or deletes an original.
* Serves the copies with a `<picture>` element, with the original as the fallback for browsers that cannot show them. The markup is the same for every visitor, so page caches keep working.
* Skips a copy when it would be larger than the original.
* Reports how much you saved, and removes every copy with one click.

**HEIC photos to JPEG**

iPhone photos (HEIC) do not show in most browsers. Converter Studio turns the ones in your library into JPEGs and keeps each HEIC file next to its JPEG. Photos WordPress already converted itself are recognised and left alone. New HEIC photos are converted before they upload.

**Poster images for videos**

Videos uploaded without a poster get one: the frame at about one second becomes the video's featured image, which the video block uses as its poster.

**Media health scan**

Lists HEIC photos, oversized images, big GIFs, images without AVIF or WebP copies, originals to compress and videos without a poster, each with a one-click fix, and the iPhone videos (MOV, HEVC) that Chrome and Firefox cannot play. The scan only reads your database.

**Optional: compress your original JPEG and PNG files**

When you say yes on the plugin's welcome screen (or in Settings), the original JPEG and PNG files themselves get smaller too, with every size WordPress made of them, under the same names, so every page that uses them gets the smaller file:

* JPEGs are encoded again with MozJPEG at the quality you set (Smaller, Balanced or Higher); JPEGs already at or below that quality are left as they are, so nothing is compressed twice.
* PNGs are made smaller without any loss with OxiPNG.
* A file is replaced only when it gets at least 5% smaller.
* Camera data (EXIF and XMP: GPS location, camera, dates) is removed by default, and the colour profile is kept; you can keep the camera data instead.
* Every file is backed up first in its own folder in your uploads. Put one image back from its details in the Media Library, or all of them from the Overview; delete the backups there to free the space.
* The AVIF and WebP copies are made before compression, from the better original, and stay served.

**Optional: shrink oversized originals**

Images larger than WordPress' big image threshold (2560 pixels) can be shrunk in place. A backup of each original is kept and can be put back.

= Three engines, your choice =

* **Automatic (recommended):** your server does what its image library can (for example WebP copies), and the browser does the rest.
* **This browser:** everything runs in the browser of whoever has a Media Library page or the Converter Studio page open.
* **This server:** the plugin uses your server's own image library when it can (GD or Imagick, through WordPress). It does images. New uploads get their copies while they upload (a few seconds at most; large images wait for the queue); bulk runs work in short steps while the plugin's page is open, at most two at a time. Many hosts have no AVIF support in their image library; the plugin says so and the browser can do AVIF instead. An administrator can turn the server engine off entirely in the settings.
* **Desktop app (optional, free):** the Converter Studio app for Windows, macOS and Linux, downloaded from [converter.studio/download](https://converter.studio/download). "Do it with the desktop app" opens it; the first time, the app asks you on your computer before it connects. It works through the queue and stops when it is done: it does not run in the background or start with your computer. It makes PDFs from Word, Excel and PowerPoint files with LibreOffice. The app's own free limits apply: 500 MB per file, plus a few larger files each month (a converter.studio plan removes them).

Each engine follows the same rules: the same quality settings, no copy larger than its original, originals kept (or, when you compress them, backed up). On the server, compression uses WordPress' image editor: with GD (no colour profiles, no camera data) some photos are left to the browser or the desktop app, and PNGs need Imagick.

= How it works, honestly =

* Work in the browser runs while a Media Library page or the Converter Studio page is open. Keep that tab open while a big batch runs; if you close it, the queue waits on your site and continues the next time.
* New uploads are queued and converted while one of those pages is open (or on the server while they upload, when it can). Uploads that arrive while nobody is in the admin (from apps, forms or other authors) wait for the next visit when the server cannot do them.
* In the browser, HEIC photos need a browser that can decode them: Safari, or Chrome and Edge on a Mac, or on Windows with HEVC support. Linux browsers and Firefox cannot; the plugin says so and leaves those photos queued for a browser (or the desktop app) that can.
* Files kept on another domain (a CDN or cloud storage plugin) cannot be read by the browser or the desktop app.
* Office documents become PDFs only with the desktop app: browsers and web servers cannot.

= Privacy =

Converter Studio makes no requests to other servers and collects no data. Files go only between your browser (or the desktop app on your computer) and your own site. All the code the plugin runs is inside the plugin.

The desktop app is optional. When you use it, it downloads your site's files to your computer, converts them there and uploads the results back to your site; your files go nowhere else. To apply its free limits, the app asks converter.studio how many large files (over 500 MB) your converter.studio account or this computer has converted this month, and counts each one it converts there (only the file's size is sent: no file, no name, nothing about your site). See the [converter.studio privacy policy](https://converter.studio/privacy) and [terms](https://converter.studio/terms).

The app connects with a key that only works for this plugin's conversion routes, as the user who connected it, and it asks you on your computer before it connects, naming that account. Settings → Connected desktop apps lists every app (and each user sees their own on the plugin's page), each with Disconnect; a key unused for 90 days stops working by itself. The app connects only to sites on HTTPS.

= Converter Studio Pro =

Everything in this plugin is free and unlimited. [Converter Studio Pro](https://converter.studio/wordpress) is a separate plugin that comes with the converter.studio Pro and Premium plans, for any number of sites. It adds:

* **iPhone videos to MP4:** MOV and HEVC videos that Chrome and Firefox cannot play become H.264 MP4s with AAC sound and a poster image, at most 1080p and made to fit your upload limit. Before they upload and for the videos already in your library: in the browser, with the desktop app (any video, including 4K), on your own server with ffmpeg, or on converter.studio.
* **Conversion in the background:** no page has to stay open; uploads from apps, forms, other authors and imports are converted as they arrive.
* **converter.studio as an engine** for what your host cannot do (AVIF, HEIC photos, video, Office documents to PDF), with your plan's credits.
* **WP-CLI commands** and updates from converter.studio.

Compare Free and Pro, and get Pro: [converter.studio/wordpress](https://converter.studio/wordpress).

= Source code and libraries =

The JavaScript in `dist/` is built from the readable source in `src/` with `tools/build.mjs` (esbuild, not minified): run `npm ci && npm run build` in the plugin folder. The four `.wasm` files in `dist/` are the unmodified encoders published on npm by jSquash, copied by that build; their source and build scripts are public:

* `avif_enc.wasm`: `@jsquash/avif` 2.1.1, libavif and libaom ([jSquash source and build](https://github.com/jamsinclair/jSquash/tree/main/packages/avif), [libavif](https://github.com/AOMediaCodec/libavif), [libaom](https://aomedia.googlesource.com/aom/)).
* `webp_enc.wasm`: `@jsquash/webp` 1.5.0, libwebp ([jSquash source and build](https://github.com/jamsinclair/jSquash/tree/main/packages/webp), [libwebp](https://chromium.googlesource.com/webm/libwebp)).
* `mozjpeg_enc.wasm`: `@jsquash/jpeg` 1.6.0, MozJPEG 3.3.1 ([jSquash source and build](https://github.com/jamsinclair/jSquash/tree/main/packages/jpeg), [MozJPEG](https://github.com/mozilla/mozjpeg)).
* `squoosh_oxipng_bg.wasm`: `@jsquash/oxipng` 2.3.0, OxiPNG 9.1.1 ([jSquash source and build](https://github.com/jamsinclair/jSquash/tree/main/packages/oxipng), [OxiPNG](https://github.com/shssoichiro/oxipng)).

Bundled libraries:

* [jSquash](https://github.com/jamsinclair/jSquash) AVIF, WebP, JPEG and PNG encoders, Apache License 2.0, with libavif, libaom, libwebp, MozJPEG and OxiPNG compiled to WebAssembly (BSD, IJG, zlib and MIT licences; libaom and libwebp also carry patent grants). This software is based in part on the work of the Independent JPEG Group. Because the Apache License 2.0 is compatible with the GPL version 3 but not version 2, the plugin is licensed GPLv3 or later.
* [Mediabunny](https://mediabunny.dev) for reading video files (poster images), Mozilla Public License 2.0. Its unmodified source is on npm (`mediabunny` 1.65.2) and [GitHub](https://github.com/Vanilagy/mediabunny).
* The HEIC container parser is adapted from WordPress' own `@wordpress/upload-media` package (GPLv2 or later).

All licence texts are in `dist/licenses/`. No HEVC decoder is included: HEIC photos are decoded by the browser and the operating system.

== Installation ==

1. Install and activate the plugin from Plugins → Add New.
2. Open Media → Converter Studio (a notice links there too). The welcome screen asks whether to compress your originals; choose, and press "Save and start".
3. Keep the page open while the library is converted, or run the health scan to see what else it finds.

== Frequently Asked Questions ==

= Does it send my files anywhere? =

No. Your browser (or the desktop app, if you use it) downloads each original from your own site, converts it and uploads the result back to your site. With the server engine the files never leave your server. Nothing else is contacted.

= Do I need the desktop app? =

No, it is optional and free. It is the fastest way through a large library, it converts any video for Converter Studio Pro, and it is the only engine that makes PDFs from Office documents. Download it from [converter.studio/download](https://converter.studio/download).

= Why must a page stay open? =

Because the work happens in your browser, not on your server. That is what makes it free and unlimited, and it works on any hosting, even without image libraries on the server. With the server engine, bulk runs also need the page open: background processing with no page open is a Pro feature. The desktop app needs no page open.

= My visitors still get JPEGs. =

Clear your page cache after the first conversion. If it still happens, the plugin's page tells you when your web server sends .avif files with the wrong type and how to fix it.

= Does it convert iPhone videos? =

The free plugin lists the iPhone videos (MOV, HEVC) that Chrome and Firefox cannot play, and gives videos a poster image. Converting them to MP4 comes with [Converter Studio Pro](https://converter.studio/wordpress).

= Will compression lower the quality of my photos? =

Only as much as the quality setting allows, once. MozJPEG at Balanced looks the same as the original to most eyes; choose Higher if you want more margin. Photos already compressed to that quality or lower are not touched, PNGs lose nothing, and every original is backed up and can be put back.

= How much space do the backups take? =

About as much as the compressed files took before. The Overview shows it, and "Delete the backups" frees it (the compressed files stay; they can no longer be put back).

= How do I undo everything? =

Media → Converter Studio → Remove all copies deletes every AVIF and WebP file the plugin made. "Put all originals back" restores every compressed original from its backup. Shrunk originals are put back from their backups in the health scan. Uninstalling the plugin also deletes the copies (on every site of a network); it keeps the JPEGs made from HEIC photos and the backups of shrunk and compressed originals. After removing copies, clear your page cache and CDN: pages they saved earlier still point at the copies.

= What about the block editor? =

Images and videos you add there are queued after they upload and converted while a Media Library or Converter Studio page is open. In the media library window (the "Media Library" button), HEIC photos are converted before they upload.

== Screenshots ==

1. Overview: the library converting in this browser, who converts, and the savings.
2. The welcome screen: compress your original JPEG and PNG files, or leave them as they are.
3. Media health scan: HEIC photos, iPhone videos, big GIFs, images without AVIF copies and originals to compress, each with a fix.
4. With Converter Studio Pro: an iPhone video converted to MP4 in the browser before it uploads.
5. An image's details: what compression saved, with a button that puts the originals back.
6. Settings: copy format, quality, compressing originals, and what happens to new uploads.

== Changelog ==

= 1.0.0 =
* First release: AVIF and WebP copies with `<picture>`, HEIC to JPEG, poster images for videos, media health scan, optional shrinking of oversized originals.
* Optional compression of the original JPEG and PNG files and all their sizes: MozJPEG for JPEGs, lossless OxiPNG for PNGs. Camera data is removed by default (the colour profile stays); every file is backed up and can be put back, one image or the whole library.
* A welcome screen asks whether to compress originals, and whether to convert the library and shrink oversized images; until you choose (or dismiss it), a notice leads there.
* Three engines: this browser, this server (its own image library, for images) and the optional Converter Studio desktop app, with Automatic as the default. Each option shows its pros, its cons and whether it works on your site.
* Office documents (Word, Excel, PowerPoint, OpenDocument, RTF) to PDF with the desktop app.
