Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/content/changelog/2026-10-19-jpeg-xl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Image optimisation: JPEG XL now ships in Chrome and Firefox"
date: "2026-10-19"
type: changed
relatedSlugs: [image-optimization]
---

The [image optimisation page](/spec/performance/image-optimization/) now covers JPEG XL, which Chrome 155 and Firefox 158 enabled in October 2026, joining Safari. It is not yet Baseline because Edge lacks it, so the page recommends offering it as an extra `<picture>` source next to AVIF rather than replacing AVIF.
4 changes: 3 additions & 1 deletion src/content/spec/performance/image-optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ status: required
order: 20
appliesTo: [all]
relatedSlugs: [lazy-loading, core-web-vitals, preload-prefetch-preconnect]
updated: "2026-08-08T00:00:00.000Z"
updated: "2026-10-19T00:00:00.000Z"
sources:
- title: "HTML Standard — 4.8.4 Images"
url: "https://html.spec.whatwg.org/multipage/images.html"
Expand Down Expand Up @@ -56,6 +56,8 @@ Keep the `<picture>` chain anyway. "Widely available" describes browser versions
</picture>
```

**Treat JPEG XL as an extra source, not a replacement.** [Chrome 155](https://developer.chrome.com/blog/jpeg-xl-in-chrome) (6 October 2026) and [Firefox 158](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/158) (13 October 2026) turned on JPEG XL decoding, joining Safari, which has supported it since version 17. Shipping in all three engines is not the same as Baseline, though: Edge has not enabled it, so JPEG XL is still limited availability. Nor is it simply a better AVIF. Its strengths lie elsewhere: it can recompress an existing JPEG losslessly into a smaller file and rebuild the original exactly, it decodes progressively, and it holds up at high fidelity. For an ordinary lossy photo at web quality, AVIF is often still the smaller file, so compare the two on your own images. To offer it, add a `<source srcset="photo.jxl" type="image/jxl">` to the chain. The browser takes the first type it supports, so put the sources in your order of preference. If you negotiate format on the `Accept` request header instead, Firefox now lists `image/jxl` there, and the response needs [`Vary: Accept`](/spec/performance/vary/) so caches keep the variants apart.

**Serve responsive sizes.** Generate the same image at several widths and let `srcset` plus `sizes` pick the right one. A 4000px image in a 400px slot wastes ~99% of the bytes.

**Always set `width` and `height`.** The browser computes the aspect ratio and reserves the slot, preventing CLS when the image loads.
Expand Down
Loading