All posts
HEIC to JPEG via CLI
Convert iPhone HEIC/HEIF photos to JPEG with heif-convert.
Open online converterPackages to install
Install libheif-examples plus the libde265 decoder — together they provide the heif-convert command.
libheif-examples
libheif-plugin-libde265
sudo apt-get update
sudo apt-get install -y libheif-examples libheif-plugin-libde265How to run the command
Call heif-convert with the input HEIC and the output JPEG path. The output extension selects the result format.
heif-convert photo.heic photo.jpegDockerfile example
Build a minimal Ubuntu image with the required packages and run the conversion inside the container.
FROM ubuntu:24.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libheif-examples \
libheif-plugin-libde265 && \
rm -rf /var/lib/apt/lists/*
WORKDIR /work
docker build -t heic-to-jpeg .
docker run --rm -v "$PWD:/work" -w /work heic-to-jpeg \
heif-convert photo.heic photo.jpegExample commands
Run these locally after installing the packages, or inside the container from the Dockerfile.
heif-convert photo.heic photo.jpegheif-convert photo.heif photo.jpg