Level up your images: JPEG XL now supported by Image Optimizer
JPEG XL is a new format based on Google’s Pik proposal and Cloudinary’s FUIF proposal. Migrating to JPEG XL reduces storage costs by serving both JPEG and JPEG XL clients with a single file. Converting existing JPEG files to JPEG XL significantly reduces their size without losing data, ensuring backward compatibility.
It is now available to Image Optimizer Professional users via the format parameter.
Why JPEG XL?
Images are critical to storytelling, especially for ecommerce websites or apps that depend on fast, high-quality imagery to sell its products, and performance is key to driving revenue through these rich media experiences. However, delivering performance cannot compromise image quality, which means applying the latest in image optimization techniques to achieve acceptable page load times is more important than ever.
With JPEG XL, you can achieve better compression than existing formats and save on bandwidth costs. For lossy encoding, JPEG XL images are roughly 60% smaller than JPEG for the same visual quality. And for lossless encoding, JPEG XL images are about 35% smaller than lossless PNGs.
JPEG XL also supports progressive decoding, which provides a better experience for users with slower connections. Newer formats like WebP and AVIF don’t support progressive downloads.
You can use JPEG XL with the existing optimize parameter to generate files of similar or smaller size to source images. Fastly also supports delivering progressive JPEG XL.
JPEG XL also offers support for:
Lossless encoding, which JPEG doesn’t support
Transparency
Animation
At the moment of writing this, JPEG XL is not supported in Chrome, but is in Safari and iOS as of 17.0. It is also supported in Firefox Nightly under the image.jxl.enabled feature flag. While JPEG XL is still relatively new, adoption continues to increase (consider support added by Apple in iOS 17.0) and we encourage you to give JPEG XL a try!
As a Fastly Image Optimizer (IO) customer, JPEG XL is immediately available. Fastly IO’s dynamic and intelligent approach enables you to easily take advantage of the benefits of JPEG XL where supported, and use other high performing image formats otherwise, ensuring compatible delivery to all users with the best quality and performance possible. If you are not already using Fastly IO to improve the performance of image delivery, enable a 30-day free trial and see what you’ve been missing!
If you are interested to learn more about how JPEG XL compares to other image formats, and some initial thinking about what is next for JPEG XL in Fastly IO, continue reading!
Take image optimization strategies even further with our essential guide
Download nowBenchmarks
The following comparisons were generated on a test set of lossless PNGs under the same settings that are used by Fastly’s Image Optimizer product. For JPEG XL images, we use encoding effort 3 and 4 threads. For AVIF images, we use chroma subsampling (422) to achieve smaller image sizes.
The following graph shows a comparison of SSIM scores for JPEG/JXL/AVIF/WebP images of similar size. SSIM (structural similarity index measure) is used to measure the perceptual difference between the original PNG image and the transformed image. We used ssimulacra2 to generate these scores.
The following graph shows encode times for JPEG/JPEGXL/AVIF/WebP images of similar size.
Future work
We’d like to explore using JPEGXL’s JPEG encoder and decoder, jpegli. jpegli is faster and achieves better compression than existing encoders like mozjpeg and libjpegturbo. This will also allow for lossless JPEG encoding.