DRAFT — pre-launch preview. Not a public service yet; owner approval required.
image-optimizer

Image to AVIF · free · in your browser · nothing uploaded

Convert a photo to AVIF, with the WebP fallback and the markup.

Drop a JPEG, PNG, WebP, GIF or BMP. You get an AVIF (typically 3–5× smaller than the JPEG export), a WebP for the few browsers without AVIF, a JPEG or PNG fallback, and a <picture> block with width, height and the right loading hints — each output compared with your original pixel by pixel (PSNR, SSIM).

  • Quality you can check. AVIF quality 45 is the default (similarity to the original ≈ 0.97 of 1, SSIM, on our photo set); drag the knob and watch bytes and fidelity move together, side by side with the original at up to 8× zoom.
  • Keeps Google's page-speed test (Lighthouse) green. The code carries the picture's size (so the page does not jump while it loads), modern formats first, and fetchpriority="high" when you tick "main picture". The measured effect: speed score 67 → 100 on the same page.
  • Private and unlimited. The encoders (jSquash: libaom and libwebp compiled to WebAssembly) run in your browser. For responsive srcset variants of a hero image, use the API with ?widths=auto.
Options
Encoder knobs

Changing a knob re-runs the conversion on the current image.

AVIF · FAQ

AVIF, WebP and what to ship

Which browsers can show AVIF?

About 97 % of users (Chrome 85+, Firefox 93+, Safari 16.4+, Edge 121+). The generated <picture> lists AVIF first, WebP second and a JPEG or PNG last, so every visitor gets an image and most get the smallest one.

What does the quality number mean?

The encoder's quality scale, 0–100. The default 45 measured a similarity of 0.967 (SSIM) and a closeness of 39 dB (PSNR) at a third of the JPEG bytes on our photo set; 35 is visibly softer in gradients, 55 buys little. The table shows both numbers for your photo so you can decide with numbers, not a hunch.

Why not just ship the AVIF alone?

Because the 3 % without AVIF support would see nothing. WebP covers nearly all of them and a JPEG covers the rest; the <picture> element makes the browser choose, with one request either way. On a phone the AVIF of a 1920-px hero is often 15–30 KB at the 640-px width — the difference between a 5-second and a 0.3-second picture on a slow phone connection (Lighthouse's Slow 4G profile).