The AVIF Image Format

For the last few weeks I have been playing around with different image formats while creating a tool for batch image conversion. It is surprising to see the level of compression that some of these new formats are capable of.

/uploads/2024/07/desktop.avif

AVIF images in particular are unbelievably small when compared to PNG and JPEG files.

The screenshot below shows wallpapers in JPG/PNG format after conversion to AVIF. These are the default wallpapers included with Ubuntu 24.04 and located in the directory /usr/share/backgrounds.

See the highlighted image below? That’s a 6.3 MB wallpaper, compressed into a file of size 72 KB.

/uploads/2024/07/avif_compression.png

The default Ubuntu Noble wallpaper weighs in at 5.9 MB and compresses to just 12 KB.

/uploads/2024/07/noble_wallpaper_timo.png

Looking at these sizes may make you think that there was some error in the conversion and that the output file is corrupt, but that’s not the case.

/uploads/2024/07/noble_wallpaper.png

Ubuntu supports setting AVIF images as desktop wallpaper. I set the AVIF image as the wallpaper on a 4K screen and could not spot any differences compared to the original image.

Ubuntu Desktop Screenshot (desktop.png, 147 KB)

Ubuntu Desktop Screenshot (desktop.png, 147 KB)

This screenshot itself is a 147 KB PNG that compresses to a 9 KB AVIF image.

Ubuntu Desktop Screenshot (desktop.avif, 9 KB)

Ubuntu Desktop Screenshot (desktop.avif, 9 KB)


See also