Skip to content

Ads may be personalised. Do you also accept cookies to measure visits? Privacy and cookies

JPEG XL, WebP or AVIF: which image format to use

All three formats make files smaller than JPG. WebP is the most widely accepted today. AVIF compresses very well, especially illustrations and low quality. JPEG XL stands out in high-quality photos, lossless mode, recompression of old JPGs and very large images, and it is the fastest to display the image. For a website, a good path is to offer more than one format.

Step by step

  1. For a photo on a website, offer JPEG XL or AVIF first, with a WebP or JPG fallback, in the picture tag.
  2. For illustrations or drawings with few colors, test AVIF and PNG.
  3. To store photos without losing anything, use lossless JPEG XL.
  4. Convert the same image to each format and compare the size with the ZiggWeb tools.

Convert to JPEG XLSee the step by step as a Web Story

Advertisement

Quick comparison

FormatWhere it shinesLimits
WebPOpens in almost every recent browser and app8 bits only, no HDR, up to 16,383 px per side
AVIFIllustrations and low quality; HDR up to 12 bitsSlower to save; no JPG recompression
JPEG XLHigh-quality photos, lossless, lossless JPG recompression, progressive, up to 32 bitsShown in Safari, Chrome 155+ and Firefox 158+; not everywhere yet

Things to watch

  • In a study by the JPEG XL authors themselves, it came out 10% to 15% smaller than AVIF at web quality, and AVIF won on illustrations. Test with your own images.
  • WebP at quality 80 is a good universal fallback for websites.
  • Do not convert from one lossy format to another lossy format several times: each pass discards more detail.

Frequently asked questions

Which format gives the lightest file?

It depends on the image. In high-quality photos, JPEG XL usually wins; at low quality and in illustrations, AVIF usually wins; WebP is a little behind both. Compare with your own images.

Which format opens in the most places?

Of the three, WebP. AVIF is also widely accepted. JPEG XL opens in Safari 17, Chrome 155 and Firefox 158 or newer, but not yet in every browser and program.

Which should I use for a personal photo archive?

Lossless JPEG XL keeps every pixel in a file smaller than PNG. If you are recompressing JPGs, the libjxl cjxl tool keeps the original JPG inside the .jxl.

Can I convert to AVIF on ZiggWeb?

Today ZiggWeb converts to JPEG XL, JPG, PNG and WebP. Use Convert to JPEG XL and Convert and compress image to compare.

Tools in this guide

Written and maintained by the ZiggWeb team.

Advertisement