Format Comparison¶
Overview¶
Format |
Lossy |
Lossless |
Compatibility |
Transparency |
---|---|---|---|---|
JPEG XL |
High |
High |
Low |
Yes |
AVIF |
High |
- |
Medium |
Yes |
WebP |
Medium |
Medium |
Medium-High |
Yes |
JPEG |
Low |
- |
High |
No |
PNG |
- |
Low |
High |
Yes |
JPEG XL vs AVIF¶
Brief Description¶
JPEG XL and AVIF are both modern image formats offering high compression ratios. They outperform HEIC, WebP, and JPEG by a wide margin.
Introduction¶
Before evaluating lossy efficiency, it’s important to understand the difference between photographic and synthetic datasets.
Synthetic (non-photographic): images created entirely on a computer without using a camera.
Photographic: images captured using a camera.
Mixed: datasets featuring both synthetic nad photographic images. Hybrid images featuring both photographic and synthetic elements qualify as well.
CID22¶
Provided by Cloudinary (JPEG XL developers). CID22 is a mixed dataset, featuring both photographic, and synthetic images. Source
JPEG XL performs well on this mixed dataset.

CID22 - lossy performance on the entire dataset.¶
JPEG XL performs best when tested on photographic data.

CID22 - lossy performance on landscape and nature.¶
When isolated to diagrams and charts (synthetic images), AVIF (AOM AV1) outperforms JPEG XL.

CID22 - lossy performance on diagram and charts.¶
Try this interactive comparison.
This dataset was covered in more detail in the official JPEG XL presentation by Jon Sneyers here.
Personally Observed Performance¶
This is a subjective overview. Efficiency on your dataset may vary.
Lossy:
Dataset Type |
Most Efficient |
Dataset Example |
Explanation |
---|---|---|---|
Photographic |
JPEG XL |
Photographs, scans. |
JPEG XL excels at compressing photographic material thanks to the VarDCT mode. |
Synthetic (non-photographic) |
*AVIF (AOM AV1) |
Screenshots, diagrams, vector graphics, Anime, digital art. |
AOM AV1 has better efficiency on synthetic images than JPEG XL. *Occasionally, JPEG XL can come out ahead, but this isn’t as common, and happens only with very complex or large images. |
Mixed |
JPEG XL |
A mix of photographic and non-photographic images. |
JPEG XL is better for unsorted datasets because how much more efficient it is on photographic images. |
Lossless:
JPEG XL lossless mode offers the best efficiency overall. WebP may perform better on certain images, but JPEG XL is the best on average. AVIF lossless mode is oftentimes worse than PNG.
Transcoding Speed¶
Format |
Encoder |
Speed |
---|---|---|
JPEG |
JPEGLI |
10.26X |
JPEG |
libjpeg |
1.09x |
JPEG XL |
libjxl |
1x |
AVIF |
AOM AV1 |
0.7x |
Capabilities¶
Feature |
JPEG XL |
AVIF |
---|---|---|
Max Resolution |
1,073,741,823 x 1,073,741,823 |
*65,536 x 65,536 |
Max Bit Depth |
32 bit |
12 bit |
Compatibility |
Low |
Medium |
Lossy Efficiency |
Excellent |
Excellent |
Lossless Efficiency |
Excellent |
- |
* Only 8193 x 4320 natively, larger sizes are achieved with tiling (which lowers efficiency and introduces artifacts).
JPEG XL has extra features, such as:
Lossless JPEG Transcoding
(Better) Progressive Decoding
Generation Loss Resilience
Photon Noise
and more…