Skip to content
heic.fyi

Learn

HEIC on Linux: open, convert and fix codec errors

Linux opens HEIC through libheif, and libheif needs an HEVC decoder (usually libde265) to turn the photo into pixels. On Ubuntu 24.04 that decoder is a separate plugin that libheif only suggests, on Fedora it comes from RPM Fusion, and on Arch it is a dependency. We ran the tools below on a real Ubuntu 24.04 system and show exactly what they printed.

By the heic.fyi teamUpdated 12 min read

Key takeaways

  • A HEIC needs two layers: libheif reads the HEIF container, and a codec decodes the HEVC image inside. libheif's README names libde265 as the default HEVC decoder, with x265 or kvazaar to encode. No decoder means 'Unsupported codec'.
  • Distributions differ. Ubuntu 24.04 packages the decoder as libheif-plugin-libde265, which libheif1 only suggests; Fedora says some codecs, HEVC included, are not in its repositories for patent or licensing reasons and points to RPM Fusion; Arch's libheif depends on libde265 and x265.
  • In our tests ImageMagick 6.9.12 on Ubuntu 24.04 failed with 'Unsupported codec' until we loaded the libde265 plugin, then converted both a plain and a tiled HEIC. FFmpeg 6.1.1 could not open HEIC at all; FFmpeg 7.0.2 reads it but wrote only one tile of a tiled file.
  • Python's pillow-heif ships its own libheif, libde265 and x265 inside the wheel, so it works regardless of the system libheif. ExifTool reads and writes HEIC.
  • If you cannot install packages, or just have a few photos, the browser converter on this site decodes HEIC without any of this and keeps files on your device.
On this page
  1. How does Linux open a HEIC file?
  2. Why does Linux say 'unsupported codec' for my HEIC?
  3. How do I open HEIC on Ubuntu, Linux Mint, Fedora or Arch?
  4. Which Linux viewers and file managers open HEIC?
  5. How do I convert HEIC on the Linux command line?
  6. Does ImageMagick support HEIC?
  7. Does FFmpeg support HEIC?
  8. How do I use HEIC in Python (pillow-heif)?
  9. Does exiftool read HEIC metadata?
  10. Why do Fedora and Ubuntu handle HEIC differently?
  11. When should I just use a browser tool instead?

How does Linux open a HEIC file?

Through libheif, an ISO/IEC 23008-12 HEIF and AVIF decoder and encoder. Almost every Linux program that reads HEIC calls it: libheif's own README lists GIMP, Krita, ImageMagick, GraphicsMagick, darktable, digiKam, libvips, pillow-heif, KDE's KImageFormats, XnView and the GNOME desktop through a gdk-pixbuf loader. libheif does not decompress the photo itself. It hands the image to a codec library.

How a HEIC file becomes a picture on LinuxFour layers. The HEIC file is a HEIF container holding an HEVC image. libheif reads the container. A codec plugin, libde265 for HEIC, decodes the HEVC image; libaom or dav1d are for AVIF only; x265 or kvazaar encode. Applications such as ImageMagick, GIMP, GNOME's Loupe and Nautilus, KDE's KImageFormats and heif-convert call libheif. If no HEVC decoder is installed, libheif reports Unsupported codec and the app shows nothing. pillow-heif bundles its own libheif, libde265 and x265 in the Python wheel.FILEphoto.heicA HEIF container holding one HEVC-compressed imageLIBRARYlibheifReads the HEIF container, then hands theimage to whichever codec is installedCODEC (BUILT IN OR A SEPARATE PLUGIN)libde265Decodes HEVC.Needed to openany HEICx265, kvazaarEncode HEVC.Needed to makea HEICaom, dav1dAV1 for AVIF.Not used forHEICAPPLICATIONImageMagick, heif-convert, heif-thumbnailerGIMP, digiKam, Shotwell, KDE (KImageFormats)GNOME Loupe and Nautilus (through glycin)pillow-heif: bundles its own copy of all threeHEVC decoder presentThe picture opensNo HEVC decoder"Unsupported codec" or "Unknown file type"
The layers between a .heic file and a picture. The failure we hit on Ubuntu sits in the third row: libheif found the container but had no HEVC decoder to give the image to.

The README's codec table says HEIC is decoded by libde265 or FFmpeg and encoded by x265 or kvazaar; AVIF uses libaom, dav1d, svt-av1 or rav1e. Since libheif 1.14.0 each codec can be a separate plugin loaded from the directories in the LIBHEIF_PLUGIN_PATH environment variable, which is how distributions split them into packages, and the README says the FFmpeg decoder plugin still prefers libde265 when both are present. The README also notes that x265 is GPL and that kvazaar (BSD) is an alternative encoder. Its October 2026 status note says libheif and libde265 are maintained by one independent developer who handled 73 security advisories in 2026, so keep both up to date.

Why does Linux say 'unsupported codec' for my HEIC?

Because libheif found no HEVC decoder. We reproduced it. This machine runs Ubuntu 24.04.5 with libheif 1.17.6 and only the AV1 decoder plugin in its plugin directory, which is what the libheif1 package depends on. The same file opens fine in pillow-heif on the same machine, so the photo is not damaged.

Our test files: test.heic is a synthetic 640 x 480 gradient saved with pillow-heif 1.8.0 (libheif 1.23.4, x265 4.2); grid.heic is a synthetic 4032 x 3024 image saved with tile_size=1024, so it is stored as tiles like an iPhone photo. Neither is an iPhone file. Run on 12 October 2026.
CommandEnvironmentWhat it printed
identify test.heicImageMagick 6.9.12-98, libheif 1.17.6, no HEVC plugintest.heic HEIC 640x480 640x480+0+0 8-bit sRGB 8110B (reading the header works)
convert test.heic out.jpgSameUnsupported feature: Unsupported codec (4.3000) 'test.heic' @ error/heic.c/IsHEIFSuccess/139 and no output file
heif-info test.heiclibheif-examples 1.17.6, no HEVC pluginBrand heic, 640x480, 4:2:0, 8-bit, then Could not decode image Unsupported feature: Unsupported codec
heif-thumbnailer -s 128 test.heic th.pngSameCould not decode HEIF image : Unsupported feature: Unsupported codec, no thumbnail
heif-enc photo.jpg -o out.heicSameNo HEVC encoder available.
heif-convert test.heic hc.jpgSame, with the libde265 plugin loaded via LIBHEIF_PLUGIN_PATHFile contains 1 image then Written to hc.jpg
convert test.heic out.jpgImageMagick 6.9.12 with the same plugin pathExit code 0; a 640x480 JPEG. The tiled grid.heic also converted, to 4032 x 3024
heif-thumbnailer -s 128 test.heic th.pngSame plugin pathExit code 0; a 128 x 96 PNG

We did not install anything system-wide. We downloaded the Ubuntu .deb files for libheif-plugin-libde265, libde265-0, libheif-examples and heif-thumbnailer from archive.ubuntu.com, unpacked them in a scratch folder and pointed LIBHEIF_PLUGIN_PATH and LD_LIBRARY_PATH at it. The plugin directory on the machine held only libheif-aomdec.so.

How do I open HEIC on Ubuntu, Linux Mint, Fedora or Arch?

Where the HEVC decoder comes from, per distribution. The commands are taken from package names and vendor pages, not run by us, because we did not change this machine.
DistributionHEVC decoder for libheifWhat to doSource
Ubuntu 24.04libheif-plugin-libde265 (in main). libheif1 depends on an AV1 plugin and only suggests it; heif-thumbnailer, heif-gdk-pixbuf and libheif-examples depend only on libheif1. The x265 encoder plugin is in universe.sudo apt install libheif-plugin-libde265 (not run). Add libheif-plugin-x265 only if you want to make HEIC.Ubuntu archive index
Linux Mint 22.xMint says 22.x is based on Ubuntu 24.04, so the Ubuntu packages above apply. Mint's release notes say nothing about HEIC, and we did not test Mint's own apps.Same as Ubuntu 24.04.Linux Mint release notes
FedoraNot in Fedora's repositories. Fedora's docs say some codecs, HEVC among them, are left out 'due to patent or licensing restrictions'. RPM Fusion's libheif-freeworld 'adds support for H.264, HEVC and VVC-encoded HEIC files'.Enable the RPM Fusion free repository, then sudo dnf install libheif-freeworld (not run).Fedora Quick Docs, RPM Fusion
Arch LinuxThe Extra repository's libheif (1.23.6-1, built 5 October 2026) lists libde265, libx265, libaom, openh264 and x264 among its dependencies.Nothing extra: sudo pacman -S libheif (not run).Arch package page

Other distributions: not verified. To find out whether yours has a decoder, run heif-info photo.heic; the failure above ends with 'Unsupported codec'.

Is there a 'HEIC extension' for Ubuntu? No. There is no Store-style add-on; the pieces are the packages above. In the GNOME desktop, heif-gdk-pixbuf adds the loader that gdk-pixbuf programs use and heif-thumbnailer registers a thumbnailer for image/heif and image/avif. The Ubuntu 24.04 index shows gnome-control-center and Shotwell depending on both, and ubuntu-desktop depending on Eye of GNOME (eog). Those still need an HEVC decoder underneath to show an iPhone photo.

Fedora and the Fedora forum describe the same split from the other side. A forum reply from March 2025 (a user's reading, not a Fedora statement) says libheif-freeworld supplements libheif with components Fedora cannot ship. The RPM Fusion configuration page says its free repository holds open-source software Fedora cannot ship 'for other reasons'.

Which Linux viewers and file managers open HEIC?

  • GNOME Loupe and Nautilus: Loupe is GNOME's default Image Viewer and loads images through glycin, whose HEIF loader uses libheif. The glycin README lists Nautilus among its users and ships a thumbnailer. Loupe's own README says which formats work depends on the glycin loaders installed. Ubuntu 24.04 has Loupe 46.2 in universe; its default desktop depends on Eye of GNOME instead.
  • Eye of GNOME and gdk-pixbuf programs: the libheif README says the GNOME desktop reads HEIC through the gdk-pixbuf loader that libheif includes. We did not test Eye of GNOME itself.
  • KDE: KImageFormats lists HEIC, HEIF and HIF as read and write 'dependent on the HEIF plugins installed'. Upstream, its HEIF plugin is off unless built with KIMAGEFORMATS_HEIF, because it needs a libheif with HEVC. Ubuntu 24.04's kimageformat-plugins depends on the libde265 and x265 plugins. We did not verify Gwenview or Dolphin specifically.
  • Shotwell: its NEWS file says 'Support HEIF/HEVC files' arrived in 0.31.90 (April 2023) and 'Support more variants of HEIF' in 0.32.0.
  • digiKam: the libheif README lists it as a libheif user. digiKam's manual lists HEIF but says no definitive format list is possible, because availability depends on the libraries on your system and how they were compiled.
  • GIMP: only if its libheif has an HEVC decoder; see HEIC in Photoshop, Lightroom and GIMP.

How do I convert HEIC on the Linux command line?

Each line below is marked. 'Ran' means we executed it here on 12 October 2026 and report what happened; 'Not run' means it comes from documentation or is a standard shell pattern.

One-liners. Replace photo.heic with your file.
TaskCommandStatus and result
Convert with libheif's toolheif-convert photo.heic photo.jpgRan (libheif-examples 1.17.6 plus the libde265 plugin): wrote the JPEG; a tiled 4032 x 3024 file came out at 4032 x 3024.
Convert with ImageMagickconvert photo.heic photo.jpgRan (ImageMagick 6.9.12): works only with a HEVC decoder, otherwise 'Unsupported codec'. ImageMagick 7 uses magick; not tested, there is no magick here.
Convert with FFmpegffmpeg -i photo.heic -frames:v 1 -update 1 photo.pngRan with three builds; see the FFmpeg section.
Convert with Pythonpython3 -c "import pillow_heif; from PIL import Image; pillow_heif.register_heif_opener(); Image.open('photo.heic').convert('RGB').save('photo.jpg')"Ran as a script making the same calls (pillow-heif 1.8.0): wrote the JPEG.
Convert a whole folderfor f in *.heic; do heif-convert "$f" "${f%.heic}.jpg"; doneNot run: a standard shell loop around the command above.
Read tagsexiftool -DateTimeOriginal -Make -Model -GPSPosition photo.heicRan (ExifTool 13.59) on a sample HEIC: printed the date, make, model and GPS position.
Write a tagexiftool -overwrite_original -Artist="Name" photo.heicRan on a copy: '1 image files updated', and reading it back showed the new Artist.

Convert a copy, never your only original: JPEG is lossy, and a second compression costs detail. Our HEIC vs JPG page has the numbers.

Does ImageMagick support HEIC?

Yes, with a libheif delegate. The ImageMagick format list says HEIC is read and write and 'requires the libheif delegate library', with defines such as heic:speed, heic:chroma and heic:preserve-orientation. Two things in our run are worth knowing.

  • Version 6 in Ubuntu 24.04 reads, but does not write: convert -list format showed HEIC r-- Apple High efficiency Image Format (1.17.6). Writing gave no encode delegate for this image format 'HEIC' as a warning with exit code 0, and the file it left behind named photo.heic was a JPEG (file reported JPEG image data). Check the file type if you rely on the exit code.
  • The security policy can block it: ImageMagick's recommended strict policy denies all image modules and permits only GIF, JPEG, PNG and WEBP. We copied the policy-websafe.xml shipped with Ubuntu's ImageMagick 6 into a scratch folder and, with a working libde265 plugin, got attempt to perform an operation not allowed by the security policy 'HEIC' and no decode delegate for this image format 'HEIC'. If HEIC works on the command line but not on a web server, look at policy.xml. ImageMagick's page adds that before 7.1.1-16 policy patterns are case-sensitive, so coder names must be upper case.

Does FFmpeg support HEIC?

Only since version 7.0, and fully only in newer builds. FFmpeg's changelog lists 'Support for HEIF/AVIF still images and tiled still images' under 7.0 and 'ffmpeg CLI tiled HEIF support' under 8.1. FFmpeg decodes HEVC with its own decoder (our 7.0.2 run mapped 'hevc (native)'), so it needs no libde265. The newest stable release on ffmpeg.org is 9.0.2 (18 September 2026), but Ubuntu 24.04 ships 6.1.1.

What each Linux tool did with a single HEIC and a tiled HEIC in our testsSix setups tested with a 640 by 480 single-image HEIC and a 4032 by 3024 HEIC stored as 1024-pixel tiles. ImageMagick 6.9.12 on Ubuntu 24.04 without an HEVC plugin failed on both with Unsupported codec. With the libde265 plugin loaded it decoded both. FFmpeg 6.1.1 failed on both with moov atom not found. FFmpeg 7.0.2 decoded the single image but wrote only one 1024 pixel tile of the tiled one. An FFmpeg build from 11 October 2026 decoded both fully, as did pillow-heif 1.8.0.TOOLSINGLE640x480TILED4032x3024ImageMagick 6.9.12Ubuntu 24.04, libheif 1.17.6, no HEVC pluginUnsupportedcodecUnsupportedcodecSame, plus libde265 pluginloaded with LIBHEIF_PLUGIN_PATHDecoded4032 x 3024FFmpeg 6.1.1Ubuntu 24.04 packagemoov atomnot foundmoov atomnot foundFFmpeg 7.0.2static buildDecodedOne 1024 pxtile onlyFFmpeg, 11 Oct 2026 buildmaster branch, newer than 9.0Decoded4032 x 3024pillow-heif 1.8.0bundles libheif 1.23.4Decoded4032 x 3024Decoded the full pictureDecoded part of itFailed, with the error shown
Six setups, the same two files. The only part of FFmpeg 7.0.2's result that differs from newer builds is the tiled file, which is how iPhones store large photos.
  • FFmpeg 6.1.1 (Ubuntu package): moov atom not found then Error opening input: Invalid data found when processing input, exit code 183, on both files.
  • FFmpeg 7.0.2 (static build): the single image decoded as a 640 x 480 HEVC (Main Still Picture) stream. For the tiled file it listed a 'Tile Grid' stream group of 4032 x 3024 but wrote a 1024 x 1024 PNG, one tile.
  • FFmpeg built from master on 11 October 2026: wrote the full 4032 x 3024 PNG.
  • Writing HEIC: the master build's muxer list had avif but no HEIC or HEIF, and ffmpeg -i test.heic out.heic stopped with Unable to choose an output format for 'out.heic'. We found no HEIC muxer in the documentation we read, so use pillow-heif or heif-enc to make HEIC.

So on a stock Ubuntu 24.04 an FFmpeg pipeline cannot read HEIC at all, and with 7.0 it can read most files but may silently return one tile of an iPhone photo. Check the output size against the input.

How do I use HEIC in Python (pillow-heif)?

Install it with pip. pillow-heif's documentation says wheels exist for most popular systems and are built with libheif and its encoders and decoders. We confirmed that on this machine: the wheel's pillow_heif.libs folder holds libheif 1.23.4, libde265 and x265, and pillow_heif.libheif_info() reports the libde265 decoder and the x265 encoder. That is why it opened both test files while ImageMagick, using the system libheif 1.17.6, could not. For Node, Go, Rust, Java and .NET, and for batch recipes, see HEIC for developers.

  • Plain Pillow does not read HEIC: Image.open('test.heic') raised UnidentifiedImageError: cannot identify image file 'test.heic' until pillow_heif.register_heif_opener() was called.
  • Reading and saving: after registering, Image.open returned a 640 x 480 RGB image and save('photo.jpg') worked. im.save('x.heic', quality=70) wrote a HEIC, and tile_size=1024 produced the tiled file we used above.
  • Building from source needs libheif 1.23.4 or newer, libde265 1.0.8 or newer and aom 3.3.0 or newer, according to its documentation, which also says distribution packages are too old for that.

Does exiftool read HEIC metadata?

Yes. ExifTool's supported-types table lists HEIC, HEIF and HIF as read and write. We ran version 13.59 on a sample HEIC with EXIF and GPS and it printed the capture date, make, model and GPS position, then wrote an Artist tag to a copy and read it back. Keep it current: its known-problems list records fixes in 13.09 (an HDR gain-map HEIC could lose its gain map in Apple Preview after XMP was added) and 13.49 (motion-photo HEIC after editing). Our metadata viewer shows the same tags in your browser, and Remove HEIC GPS strips location without any install.

Why do Fedora and Ubuntu handle HEIC differently?

Patents. GIMP's developer documentation puts it bluntly: 'HEVC has patent issues, unlike its AVIF counterpart', which is 'why many Free Software distributors do not wish to package HEIC support'. Fedora's documentation says its repositories leave out some codecs for patent or licensing reasons and sends users who want HEVC to RPM Fusion. Ubuntu ships the libde265 plugin in its main archive component in 24.04. We are not lawyers and this page does not say what is legal where you are; it says what each distribution packages.

When should I just use a browser tool instead?

When you lack root, when the machine is a work laptop, when you have a handful of photos, or when your distribution's libheif is the problem. Our converter decodes HEIC in your browser with WebAssembly, so it behaves the same on every distribution. Limits: 100 MB per file, 100 megapixels per image, and 50 files or 500 MB per batch. Nothing is uploaded. The JPG keeps the capture date and camera details by default, while GPS is left out unless you switch on Include location (GPS).

Try it here

Convert HEIC to JPG here

Drop your HEIC files in. They are decoded in your browser and never leave this device. For larger sets, use the batch converter.

HEIC on Linux: which route?If thumbnails or viewers show nothing, install the libde265 HEVC plugin for libheif. To script a batch to JPG, use heif-convert from libheif-examples or pip install pillow-heif. If FFmpeg is in a pipeline, use 7.0 or newer, and a newer build for tiled iPhone files. To read or write tags, use exiftool. For a one-off or a locked-down machine, convert in the browser.What do you need to do with the HEIC?IFDO THISViewer orthumbnailsshow nothingAdd the HEVC pluginlibde265 for libheif; on Fedoralibheif-freeworld from RPM FusionScript a batchto JPGheif-convert or Pythonlibheif-examples, orpip install pillow-heifFFmpeg in apipelineUse FFmpeg 7.0 or newerTiled iPhone files need anewer build (see test results)Read or edittagsexiftoolReads and writes HEIC;we ran 13.59 hereOne-off, or noadmin rightsConvert in the browserNo install, nothing uploaded;works on any distro
Pick the row that matches your task. The last row works on any distribution.

To see why one file opens and another does not, run it through the HEIC file checker and read HEIC vs HEIF for the container-versus-codec split. Windows and Mac readers have their own guides: Open HEIC on Windows and HEIC to JPG on Mac.

Frequently asked questions

Try it yourself

Related reading

Sources

How we research and correct: editorial policy.

Written by the heic.fyi team · Last updated: · Spotted an error? Tell us.