Tutorials

How to View HEIC Files on Linux / Ubuntu

koboshiCo-founder
·4 min read
Summary

Linux desktops often can't open HEIC files out of the box. Here's how to fix it: install libheif for heif-convert, grab a viewer with HEIC support, or convert in the browser. Covers Ubuntu, Debian, Fedora, and Arch.

Someone sends you a photo from an iPhone. You open it in your default viewer and get a blank window or an error about an unsupported format. The file is fine. Your Linux install just does not ship the HEIC decoder by default.

The fix usually comes down to one package. Here are the three ways to view HEIC on Linux, from the command line to a one-off browser convert.

Why Linux Can't View HEIC

HEIC is a container format with HEVC-compressed images inside. Most Linux distributions do not bundle a HEVC decoder for the same reason Windows does not: patent licensing. So the codec is available, but it is not on by default.

The good news is that the tooling is mature. libheif provides both a library and command-line tools, and most distributions package it cleanly.

Method 1: heif-convert from libheif (Command Line)

The quickest route is the heif-convert tool that ships with libheif. Install it, then convert a file.

On Ubuntu and Debian:

sudo apt install libheif-examples
heif-convert photo.heic photo.jpg

On Fedora:

sudo dnf install libheif-tools
heif-convert photo.heic photo.jpg

On Arch:

sudo pacman -S libheif
heif-convert photo.heic photo.jpg

That drops a JPG next to your HEIC. For a whole directory, loop over the files:

for f in *.heic; do heif-convert "$f" "${f%.heic}.jpg"; done

Method 2: Use a Viewer with HEIC Support

If you prefer a GUI, pick a viewer that can read HEIC directly.

  • gThumb is a lightweight image viewer that supports HEIC out of the box on most distros. Install it with your package manager and open the file.
  • On Ubuntu, installing libheif1 alongside a modern gThumb covers most cases.
  • ImageMagick with libheif support can also display and convert, though it is more at home on the command line.

If your default viewer still refuses the file after installing libheif, a viewer like gThumb is the reliable pick.

Method 3: Convert in the Browser (One-off)

When you just need a single file and do not want to touch the terminal, convert it in a browser. Our HEIC to JPG converter runs entirely on your device:

  1. Drop the file. Drag the HEIC into the browser.
  2. Convert locally. A WebAssembly build of libheif decodes it on your machine. Nothing is uploaded.
  3. Download the JPG. Open it in any viewer.

You can also output PNG or WebP if you need those formats.

Which Approach Should You Use?

SituationBest method
Command line user, one fileMethod 1, heif-convert
A whole folder of photosMethod 1, loop over the files
Prefer a GUIMethod 2, gThumb
One-off, no install wantedMethod 3, browser
Need PNG or WebP outputMethod 1 or 3, pick the format

FAQ

Does Ubuntu open HEIC natively? Not by default. Install libheif-examples (or libheif1 plus a HEIC-aware viewer) and the files open normally.

What package provides heif-convert? On Ubuntu and Debian it is libheif-examples. Fedora splits it into libheif-tools, and Arch includes it in libheif.

Can I view HEIC without converting? Yes. Install libheif and use a viewer that supports it, such as gThumb. The viewer decodes the file without changing it.

Does converting HEIC lose quality? JPG is lossy, but at high quality the difference is usually invisible. Resolution is preserved.

Bottom Line

Install libheif-examples on Ubuntu and Debian, libheif-tools on Fedora, or libheif on Arch, then use heif-convert to turn photos into JPGs. Prefer a GUI, pick gThumb. For a single file with zero installs, convert it in the browser. Every path gets the photo out of the container and onto your screen.

More blog posts to read