no encode delegate for this image format (AVIF, HEIC, WebP)
Format support is compiled into ImageMagick, not enabled by a flag. How to check what your build supports and install a build that includes the format you need.
convert: no encode delegate for this image format `WEBP' @ error/constitute.c/WriteImage/1265
convert: no decode delegate for this image format `HEIC' @ error/constitute.c/ReadImage/575
What it means
ImageMagick does not implement most codecs itself. It links against external libraries — libwebp, libheif, libjxl, libraw — at compile time. If your binary was built without one, no command-line flag can add it. The support is either in the binary or it is not.
Check what you have
magick -list format | grep -iE 'webp|heic|avif|jxl'
WEBP* WEBP rw- WebP Image Format (libwebp 1.3.2)
HEIC HEIC r-- High Efficiency Image Format
The three characters are read, write and multi-image support. In that example WebP can be read and written, HEIC can only be read. A format missing from the list entirely is not supported at all.
Also useful:
magick -version # the DELEGATES line lists compiled-in libraries
magick -list delegate # external programs it can shell out to
Getting a build with the format
macOS
brew install imagemagick
Homebrew's build includes WebP, HEIC and AVIF. If you installed a long time ago, brew upgrade imagemagick.
Debian / Ubuntu
The stock imagemagick package is often missing HEIC and sometimes AVIF. Install the extra delegates:
apt install imagemagick libmagickcore-6.q16-6-extra
apt install libheif1 libheif-plugin-libde265 # HEIC/AVIF decoding
If that is not enough, the AppImage from imagemagick.org is a fully-featured IM7 build with no compiling:
wget https://imagemagick.org/archive/binaries/magick
chmod +x magick
./magick -list format | grep -i heic
Alpine
apk add imagemagick imagemagick-heic imagemagick-webp imagemagick-jpeg
Alpine splits every delegate into its own package, so a bare apk add imagemagick supports almost nothing. This catches a lot of people building small Docker images.
Format-specific notes
- HEIC — needs libheif. Reading iPhone photos also requires an HEVC decoder such as libde265; some distributions omit it for patent reasons, which is why HEIC often shows as unsupported even with libheif present.
- AVIF — needs libheif built with libaom or a comparable AV1 codec. Encoding is slow; expect several seconds for a large photo.
- JPEG XL — needs libjxl and a recent ImageMagick. Support is still uneven across distributions.
- RAW (CR2, NEF, ARW) — delegated to
dcraworlibraw, which are separate installs.
Workarounds when you cannot change the build
# WebP via the reference encoder
cwebp -q 80 input.png -o output.webp
dwebp input.webp -o output.png
# HEIC via libheif's own tools
heif-convert input.heic output.jpg
# AVIF via libavif
avifenc --min 20 --max 30 input.png output.avif
Convert with the dedicated tool, then hand the result to ImageMagick for everything else. In a pipeline this is often faster anyway.