Topic · 3 items
Images
Images often weigh more than everything else on a page. Here I follow formats (AVIF, WebP, JPEG XL), compression tools and the services that convert for you, each time with what it changes for page weight and LCP.
Follow this topic By RSS, in your feed reader
JPEG XL vs AVIF: an independent benchmark keeps AVIF as the default
With JPEG XL now decoded by Chrome, the question of the default image format is back. Jake Archibald's benchmark, published October 15 (libjxl 0.12, avifenc 1.4.2, SSIMULACRA2 and ColorVideoVDP metrics), settles it for the web: on lossy photos, the best JPEG XL weighs 15 to 25% more than AVIF at default effort settings, and 30 to 90% more on screenshots and illustrations, while taking two to three times longer to decode. JPEG XL keeps the edge for lossless recompression of existing JPEGs (9 to 20% smaller) and for lossless compression.
Next step
Keep AVIF as your first choice, in 4:4:4 (4:2:0 chroma subsampling rarely saves bytes) and at the highest effort your build pipeline can afford. Save JPEG XL for a library of JPEGs whose originals are gone, always with a fallback in <picture>, since Edge doesn't decode it.
This matches our own benchmark, where AVIF came out lightest in 7 of 8 measurements at typical web quality settings.
pngdeer, a PNG compressor that picks its own quality
Screenshots and UI graphics that have to stay PNG can still get lighter: pngdeer, released as open source (MIT license), reduces their color palette (lossy compression) with no quality slider. It tries palettes from 2 to 256 colors, with or without dithering, scores each attempt with the SSIMULACRA2 metric and keeps the smallest file that reaches its target, capped at 90. On the author's benchmark (180 images, reproducible from the repository), the median file is 8 to 12% smaller than with TinyPNG; it ships as a command-line tool (Homebrew) and as an in-browser WebAssembly app that never uploads your images.
Next step
Run your UI PNGs through pngdeer, then through a lossless optimizer like oxipng, which remains complementary. Set the quality with --target if you want consistent results across images, and keep AVIF or WebP for anything that doesn't need to be PNG.
The project is young (424 stars and 33 commits so far) and the benchmark comes from its author: try it on your own images before adding it to a build pipeline.
JPEG XL arrives in Chrome 155, then in Firefox 158
Chrome 155, stable since October 6, decodes JPEG XL images with a new decoder written in Rust. Firefox 158 enables it by default on October 13 and adds image/jxl to the Accept header of its image requests. Safari has decoded it since version 17, for still images only. Google recommends trying both AVIF and JPEG XL and keeping whichever performs better: JPEG XL shines mostly for high-fidelity and lossless photos.
Partial support: Chrome 155, Firefox 158, Safari 17 without animation or progressive decoding
Next step
Compare JPEG XL and AVIF on your high-fidelity photos, then serve JPEG XL inside <picture> with a <source type="image/jxl"> placed before the AVIF and WebP sources, never on its own.
One more format in
<picture>, not a switch. AVIF stays the first choice until your own measurements say otherwise.