JpegXL Finally Lands in Chromium

• by Petabite
webperformanceimagesstandards

JpegXL Finally Lands in Chromium

After years of back-and-forth, JpegXL support has finally been merged into Chromium. This isn’t just another image format—it’s potentially the last image format the web will need.

What Makes JpegXL Special?

1. Better Compression

JpegXL typically beats JPEG by 20-30% at equivalent quality, and matches or exceeds WebP and AVIF:

Original PNG: 2.4 MB
JPEG (q=80): 450 KB
WebP: 380 KB
AVIF: 360 KB
JpegXL: 340 KB (with better quality than AVIF)

2. Lossless JPEG Transcoding

You can convert existing JPEGs to JpegXL losslessly and save ~20% file size. Then decode back to bit-identical JPEG. This is huge for migrations.

# Convert with no quality loss
cjxl input.jpg output.jxl --lossless_jpeg=1

# Get back identical JPEG
djxl output.jxl reconstructed.jpg

3. Progressive Decoding Done Right

JpegXL supports true progressive decoding where each byte of data improves the image. Unlike JPEG’s “scan” approach, JpegXL can show useful previews from just 1% of the data.

4. Modern Features

  • HDR support: 10-bit and even 16-bit color depths
  • Wide gamut: Full P3 and Rec.2020 support
  • Animation: Like GIF but efficient
  • Alpha channel: Like PNG but smaller
  • Layers: Lossless overlays for graphics

Why It Took So Long

The drama is worth knowing. Google initially supported JpegXL in Chrome, then removed it in favor of their own AVIF format. The stated reason: “not enough adoption.”

The actual reason? Politics and NIH syndrome.

AVIF is based on AV1 video (where Google has patents). JpegXL is ISO standard tech with no patent encumbrance. The web development community revolted, filed bugs, and eventually Google capitulated.

Using JpegXL Today

<!-- Progressive enhancement -->
<picture>
  <source srcset="image.jxl" type="image/jxl">
  <source srcset="image.avif" type="image/avif">
  <source srcset="image.webp" type="image/webp">
  <img src="image.jpg" alt="Fallback for old browsers">
</picture>

Encoding Tips

# High-quality encoding (slower, smaller)
cjxl input.png output.jxl -e 9 -d 0

# Fast encoding (good for thumbnails)
cjxl input.png output.jxl -e 3 -d 1

# Lossless (for graphics/screenshots)
cjxl input.png output.jxl -d 0 -e 9

The Performance Impact

For a typical media-heavy site:

  • 20-30% reduction in image bytes
  • Faster page loads (less data to transfer)
  • Better quality (or same quality at smaller size)
  • Battery savings (less decoding work than AVIF)

What This Means

With JpegXL in all major browsers (Safari already supported it), we finally have a unified solution:

  • Replaces JPEG for photos
  • Replaces PNG for graphics
  • Replaces GIF for animations
  • Replaces WebP for everything
  • Competes with AVIF on efficiency

The format war is over. JpegXL won by being technically superior and politically neutral.

Start encoding.