Image formats: AVIF, WebP and JPEG XL

Every day thousands of images are used across the internet. But what about the underlying file formats?

When sharing files, many people overlook the file format used.

Does it really matter? Yes and no. If simply storing on-device when storage isn’t an issue: use whatever format you want so long as it supports your desired features.

But when saved data means saved time and money, file format can make a big difference.


Disclaimer: This post only regards raster, not vector images

Before explaining further if you want to simply know the format I recommend: WebP

If you desire to transcode images to modern formats like WebP, my personal favorite tools to do so are:

  • Ezgif : Recommended website for manual transcoding. Works well for weaker and older devices and should be used for transcoding if other methods are unusable. Supports many methods of modernization.
  • Squoosh : In-browser transcoder. Alternative that may work well for more powerful devices, or if working offline. However transcoding properly may require tweaking. Does not support transcoding GIF to animated WebP and does not support vectorization.
  • FFmpeg : Command line only. Has the most support for fine-tuning and can achieve best results but requires more work for maximum effect. Recommended for bulk transcoding and use-cases requiring advanced changes.

Exploring further though, what are the actual differences between modern image file formats?

Formats:

WebP:

Also known as: Web Picture format

  • Developed by Google in 2010 
  • Uses VP8  encoding - the same as most WebM videos
  • Supersedes JPEG, PNG and, GIF, alongside their functionality
  • All widely used modern browsers support
  • Optional incremental decoding  allows images to be displayed near-instantly even on extremely low speed connections

 

AVIF:

Also known as: AV1 Image File Format

  • Developed by the Alliance for Open Media in 2019
  • Newly supported in all widely used browsers since 2024
  • Intended to supersede WebP and supports all features WebP does
  • Uses a similar philosophy with a basis in a video format encoding, using the more modern AV1 encoding instead of VP9
  • HDR Support
  • Images must be fully loaded before they can display

 

JXL:

Also known as Joint Photographic Experts Group X (Series) Long-term

  • Intended to supersede WebP
  • Partial support in Safari by default. Almost fully supported in Chrome behind an experimental flag (lacking progressive decoding support)
  • Developed by the Joint Photographic Experts Group, Google, and Cloudinary in 2019.
  • Max image size of 1,073,741,823x1,073,741,824
  • Supports progressive rendering  and decoding
  • While JPEG hardware decoders could be used alongside with theoretical JXL decoders, in practice few of either actually exist forcing reliance on software decoders instead

Conclusion

Based on the wide support, better compression, and additional features; my recommendation is using WebP in the present and someday upgrading to JXL.

AVIF does have the potential for advantages and is usable right now, yet falls behind JXL to the point the effort isn’t considered worth it instead of simply using JXL via feature flags for HDR and better compression.

 

Sources:

No comments yet