What is AVIF, the lightweight image format Google plans to replace JPG with in Chrome and Android 12



If AV1 is the video codec of the future, AVIF is the image format that will accompany him, and that future is closer than ever. While Google added support for AVIF with Chrome 85 to the desktop in mid-2020, with the arrival of 2021 we will start to see it everywhere.



Mozilla incorporated it to Firefox in January, with Android 12 it will be reaching the most used mobile operating system in the world, and Chrome for Android will also support it with the next version 89. AVIF promises a great little revolution, being much lighter than JPG and maintaining visual quality.



What is AVIF




Simon Berger Twukn12en7c Unsplash Blog



The acronym AVIF stands for "AV1 Image File Format", a modern image container format based on the AV1 video format. AVIF is a specification for storing both still and animated images, compressed using the AV1 codec in the generic HEIF high-efficiency image file format.



HEIF and AV1 are based on the same standard (ISO-23000-12), and by itself HEIF is around 50% more efficient at saving space than JPG, one of the reasons Apple started using HEIF in its systems as an image container format for default.



Basically, an AVIF image is a HEIF image compressed using AV1 instead of the HEVC MPEG codec, which is not open and does have license costs, hence, as efficient as HEIF is, we are already looking at AVIF as a replacement , because not only is it free and open, but it performs a tiny bit better.



AVIF supports:



  • High dynamic range (HDR).

  • 8, 10 and 12 bit color depth.

  • Lossless compression and lossy compression.

  • Monochrome (alpha / depth) or multicomponent.

  • Any color space, including wide gamut, ISO / IEC CICP, and ICC profiles.

  • Chroma subsampling 4: 2: 0, 4: 2: 2, 4: 4: 4.

  • Film grain.






AV1 vs VVC: the battle between the video codecs of the future is beginning and Netflix already chose the winner





The format for a lighter web





Avif Vs Jpg

Image quality in AVIF (left) vs JPEG (right) with the same file size - Source: jakearchibald.com



AVIF, like AV1, seeks to be much more efficient in compressing files. While AV1 can offer up to 20% more efficiency in video compression, AVIF manages to offer up to 50% more compression on images with almost no loss of visual quality.



And that 50% is in relation to the WebP format, which already achieves acceptable image qualities with files up to half the size of a JPEG. AVIF can do almost as good a job compressing images that weigh less than a third of what one would weigh in JPGE.



That's especially useful on the web, and in many contexts where you don't need the highest possible quality but rather the best balance between an image that looks good and one that loads fast. When it comes to achieving that balance, no container format is as good as AVIF.





Avif Vs Webp

Image quality in AVIF (left) vs WebP (right) with the same file size - Source: jakearchibald.com






AVIF offers better compression than WebP, JPEG, PNG, and GIF




AVIF offers far better WebP, JPEG, PNG, or GIF compression, and is designed to replace all of them in the future. A future that is getting closer and closer. Just as Apple started using HEIF in 2017 as the default format due to the advantages it offers over JPG, now Google with Android 12 will begin to support AVIF, which means that sooner or later many mobiles will start taking photos in that format instead of in JPG.



But unlike other initiatives, AVIF stands from the start as the best candidate to be the next standard, not only because of its license costs (zero), how efficient it is when compressing the images, but it is also supported not only by Google and other technology giants such as Amazon, Microsoft, Apple, Mozilla, Intel, Facebook, Adobe , VideoLAN and Netflix.



Netflix started using it in 2018, Microsoft added support on Windows 10 in 2019, applications like VLC, GIMP, Paint.net, and Darktable offer support as well. Chrome and Firefox already support it, and since Apple is a member of the coalition of companies behind the development of AV1 this time around, we probably won't have to wait a decade to see support on iOS, macOS, or Safari.