This simple tutorial shows how to install the latest version of libheif library, for better HEIF and AVIF image formats support, in Ubuntu 24.04, Ubuntu 22.04 and/or Ubuntu 20.04 LTS.
Libheif is a popular free open-source library for encoding and decoding HEIF and AVIF. Which, also has partial support for JPEG-in-HEIF, JPEG2000, uncompressed (ISO/IEC 23001-17:2023) capabilities.
It supports libde265 and/or ffmpeg for decoding HEIC images, and x265/kvazaar for encoding. For AVIF images, it uses either AOM/dav1d for decoding, and AOM/rav1e/svt-av1 for encoding support.
As well, it has command line tools to convert HEIF/HEIC to other images, and convert images to HEIF/HEIC.
Many popular applications, including GIMP, Darktable, ImageMagick, Krita, and gThumb, use libheif for HEIF and/or AVIF support. And, the library is usually installed as dependency along with them.