Install libheif 1.19.8 in Ubuntu 24.04 | 22.04 for iOS 18 Support

Last updated: July 4, 2025 — 6 Comments

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.

gThumb use libheif for AVIF support

However, libheif in Ubuntu system repositories is always old! While it has 1.6.1 (for 20.04) and 1.12.0 (for 22.04), the latest release is now 1.20.x.

So, if you want to use the library for new encoders/decoders, improved performances, and bug-fixes. Or, you just run into issue with current version. Then, installing the latest version is a good choice before reporting or asking for help!

And, features in latest libheif compare to system default ones:

  • reads images generated by iOS 18
  • experimental codec plugins for VVC (vvenc/vvdec and uvg266)
  • experimental codec plugin for OpenJPH (High-throughput JPEG2000)
  • support ISO 23001-17 version 1 uncC minimized headers
  • support ISO 23001-17 images with ‘deflate’, ‘zlib’ and Brotli compression
  • heif-enc can read TIFF images
  • API functions to read/write raw items and item properties
  • tile access for high-resolution images
  • decode AVC images through OpenH264
  • For more, see github releases page.

NOTE: Update libheif from PPA repository MAY cause conflict to other third-party packages!! Use it at your own risk.

Install Latest Libheif (1.19.8 updated) in Ubuntu via PPA

Step 1: Add PPA:

The official Ubuntu PPA has revived recently with libheif 1.19.8 for Ubuntu 20.04, 22.04, and 24.04 on amd64, arm64/armhf platforms!

To add the PPA, open terminal (Ctrl+Alt+T) and run command:

sudo add-apt-repository ppa:strukturag/libheif

Type user password (no visual feedback) when it asks and hit Enter to continue.

2. Then, you can either use Software Updater (Update Manager) to upgrade your current library to the latest:

Or, run command in terminal to install/upgrade it:

sudo apt install libheif1 heif-gdk-pixbuf heif-thumbnailer

Linux Mint user need to run sudo apt update to refresh package cache first.

NOTE: If you have Ubuntu Pro enabled, then, try the command below instead to specify package source, or it MAY install the one from Ubuntu ESM.

sudo apt install -t "o=LP-PPA-strukturag-libheif" libheif1 heif-gdk-pixbuf heif-thumbnailer

As you see in last screenshot, there are also some encoder/decoder plugins available. If they are not installed, run sudo apt install plus the package name to install as you want.

At the moment, the plugins (encoder/decoders) include:

  • libheif-plugin-aomdec
  • libheif-plugin-aomenc
  • libheif-plugin-dav1d
  • libheif-plugin-ffmpegdec
  • libheif-plugin-j2kdec
  • libheif-plugin-j2kenc
  • libheif-plugin-jpegdec
  • libheif-plugin-jpegenc
  • libheif-plugin-libde265
  • libheif-plugin-svtenc (20.04 excluded)
  • libheif-plugin-x265

There are as welllibheif-examples package that provides heif-convert command (it’s now a link to heif-enc) to convert HEIC/HEIF image to other formats, and heif-enc to convert image to HEIC/HEIF.

Uninstall:

For any issue, you may purge the Ubuntu PPA, so to remove PPA repository, and downgrade all installed packages to the stock versions in system repository.

To do so, first open terminal (Ctrl+Alt+T) and run command to install ppa-purge tool:

sudo apt install ppa-purge

Then, purge the PPA (as well as downgrade packages) via command:

sudo ppa-purge ppa:strukturag/libheif

NOTE: ppa-purge may fail sometimes (due to e.g., internet corruption). In the case, you may do the steps below one by one to downgrade manually:

  • First, run command to add an apt configuration file and edit via nano command line text editor:
    sudo nano /etc/apt/preferences.d/libheif1
  • When the file opens, add the line (Ctrl+C to copy, Ctrl+Shift+V to paste) below:
    Package: libheif* heif*
    Pin: origin archive.ubuntu.com
    Pin-Priority: 1001

    The rules will set higher priority (1001, meaning allow to automatically downgrade) for all libheif related packages from Ubuntu repository.

  • After that, press Ctrl+S to save file, and Ctrl+X to exit. Then, run command to refresh cache:
    sudo apt update
  • Finally, run command below will install back the old libheif libraries (meaning downgrade) from system repository.
    sudo apt install libheif1 heif-gdk-pixbuf heif-thumbnailer
  • When done, remove the rule you just added:
    sudo rm /etc/apt/preferences.d/libheif1

    Finally refresh cache sudo apt update to apply change.

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

6 responses to Install libheif 1.19.8 in Ubuntu 24.04 | 22.04 for iOS 18 Support

  1. sudo apt install libheif1

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    libheif1 : Depends: libheif-plugin-libde265 (= 1.17.6-1~ppa1~ubuntu20.04) but it is not going to be installed

    • Thank you for pointing out the issue.

      The package in that PPA now has a dependency library available in another PPA. So, you also need to run command below to add the dependency PPA before being able to install the package:

      sudo add-apt-repository ppa:strukturag/libde265
  2. Iphone 15 with iOS18 needs libheif 1.18+ to work. Any hope of getting this with 1.18?

  3. THANK YOU! Trying to convert some iPhone images. It went, 1. that’s weird. 2. struggle, struggle, struggle, 3. found this page. 4. my images are converted.

  4. Thanks a lot!
    By now the PPA repository ppa:ubuntuhandbook1/libheif has the 1.95.5 version and works great with iphone 15 and ios 18.1.1

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*