
Mozilla is preparing to enable JPEG XL support in Firefox, bringing the modern image format closer to broad browser adoption alongside AVIF.
The company says its implementation relies on a new Rust-based decoder designed to reduce security risks while supporting features such as progressive image loading.
Mozilla engineer Jake Archibald announced the move in a post detailing Firefox’s “intent to ship” JPEG XL. Mozilla first added experimental JPEG XL support behind a browser flag in 2021, but held off on enabling it more broadly because the available decoder consisted of roughly 100,000 lines of multithreaded C++, creating concerns about the amount of security-sensitive code being added to Firefox.
Instead, Mozilla challenged the JPEG XL team at Google Research to develop a smaller, performant and compatible decoder in Rust. Google Research subsequently created jxl-rs, which Mozilla is now using as the core of Firefox’s JPEG XL implementation. Rust is widely used in security-sensitive software because its memory-safety protections can prevent classes of bugs that commonly affect C and C++ programs.
According to Archibald, Chrome is also planning to ship JPEG XL support, while Safari has included a partial implementation since 2023. Mozilla therefore expects the format to have support across major browsers before the end of 2026.
One of Firefox’s notable JPEG XL features is progressive rendering, which allows an image to become visible while it is still downloading. Instead of waiting for the entire file, users can initially see a rough version that becomes progressively sharper as more data arrives. The feature can be particularly useful for large images or slower connections because the subject of an image may become recognizable after only a small portion of the file has been transferred.

hacks.mozilla.org
JPEG XL will not replace AVIF outright. Mozilla describes the two formats as better suited to different situations.
AVIF generally produces smaller files for typical web-quality photographs and images combining sharp edges with flat areas. JPEG XL has advantages for lossless images, progressive rendering, and recompressing existing JPEG files without further quality loss.
In one example shared by Mozilla, an image encoded at comparable medium-high quality measured 116 kB as AVIF and 134 kB as JPEG XL. When encoded losslessly, however, JPEG XL produced a 1.45 MB file compared with 1.76 MB for AVIF and 1.55 MB for lossless WebP.
Developers should test JPEG XL and AVIF against representative content from their sites and choose based on image quality, file size, and loading behavior. JPEG XL may be particularly attractive where lossless compression or progressive loading of large images matters more than achieving the smallest possible file at typical web quality.







Leave a Reply