One command does the job — if your build can decode AVIF. Here is how to check, how to install a build that can, and how to fix the three errors people hit most.
magick input.avif output.jpg
That is the whole conversion. If it works, stop reading and go convert your folder. If it fails with no decode delegate for this image format 'AVIF', your ImageMagick was built without AVIF support — which is the normal state on many Linux distributions and on older Windows installers. Jump to the error section.
ImageMagick 7 uses magick as the entry point. If you are on version 6, the legacy commands still work: convert input.avif output.jpg. On Windows, prefer magick — convert collides with the built-in convert.exe disk tool.
Before installing anything, ask ImageMagick what it can read:
magick -list format | grep -i avif # macOS / Linux
magick -list format | findstr /i avif # Windows
You want a line that starts with AVIF and shows rw+ in the rights column. On our test machine (ImageMagick 7.1.2-35 with libheif 1.23.7) the line reads:
AVIF HEIC rw+ AV1 Image File Format (1.23.7)
If the command prints nothing, the format is not registered at all. If the rights column shows --- instead of rw+, the format is known but not usable. Both mean the same thing in practice: no AVIF decoding.
Also check the version and the delegates list:
magick -version
magick -list delegate | grep -i heic
AVIF decoding goes through libheif, which in turn needs an AV1 decoder — usually libaom or dav1d. A build can have libheif and still fail, because the codec plugin is missing.
macOS (Homebrew) — the bottled build includes libheif and an AV1 decoder:
brew install imagemagick
Ubuntu / Debian — install the AV1 plugin alongside the main package:
sudo apt update
sudo apt install imagemagick libheif-plugin-aomdec
On releases older than Ubuntu 24.04 the plugin package may not exist. In that case install libheif1 from a newer repository, or build ImageMagick against a libheif that includes libaom. This is the single most common reason AVIF fails on Linux.
Fedora:
sudo dnf install ImageMagick libheif
Windows — use the official installer from imagemagick.org, or:
winget install ImageMagick.ImageMagick
After installing, close and reopen your terminal so the new PATH is picked up, then repeat the format check above.
JPEG quality is set with -quality, on a 0–100 scale:
magick input.avif -quality 92 output.jpg
| Quality | Typical use | Result |
|---|---|---|
| 95–100 | Archival, further editing | Very large files, diminishing returns above 95 |
| 85–92 | Photos, print, client delivery | Visually indistinguishable at normal viewing distance |
| 70–80 | Web uploads, email | Noticeably smaller; fine on screen |
| 50–65 | Thumbnails, previews | Visible artifacts in gradients and fine texture |
If a form or upload limit dictates the size, do not guess: let ImageMagick hit the target.
magick input.avif -define jpeg:extent=500KB output.jpg
jpeg:extent re-encodes internally until the file fits under the limit, so you get the best quality that still passes the limit. Two other flags are worth knowing: -sampling-factor 4:2:0 halves the colour resolution and shrinks photos noticeably, and -interlace Plane writes a progressive JPEG that renders top-down on slow connections.
By default, transparent pixels convert to black. If the source is a logo or an icon, that is usually not what you want:
magick input.avif -background white -alpha remove -alpha off output.jpg
Swap white for any colour. If you need to keep the transparency, JPEG is the wrong target — write a PNG instead:
magick input.avif output.png
Same folder, output beside the originals:
magick mogrify -format jpg -quality 92 *.avif
Keep the output separate so originals stay untouched:
mkdir -p jpg
magick mogrify -path jpg -format jpg -quality 92 *.avif
Recursive, with a failure log — useful when a folder contains a few corrupt or animated files:
find . -name "*.avif" -print0 | while IFS= read -r -d '' f; do
out="${f%.*}.jpg"
if magick "$f" -quality 92 "$out" 2>>errors.log; then
echo "ok $out"
else
echo "FAIL $f" >> failed.txt
fi
done
At the end, cat failed.txt lists everything that did not convert. In practice the failures are almost always one of three things: a truncated download, an animated AVIF, or a file whose extension lies about its contents.
no decode delegate for this image format 'AVIF'The build has no AVIF support at all. Either the format was compiled out, or libheif is missing. Fix by installing a build that includes it (see Step 2), not by reinstalling the same package.
heif: Unsupported feature: Unsupported codec (4.3000)This one is subtler: libheif is present, so ImageMagick recognises AVIF, but libheif has no AV1 decoder to unpack the pixels. On Debian and Ubuntu that means the libheif-plugin-aomdec (or dav1d) package. This error is the reason a "supported format" check can pass while conversion still fails.
magick: unable to open image '...': No such file or directoryUsually a path problem, not a codec problem. On Windows, quote paths that contain spaces; in PowerShell, ~ is not expanded the way it is in bash. Run ls (or dir) in the same terminal to confirm you are in the right folder.
Some distributions ship a restrictive policy.xml. Check with magick -list policy; if AVIF appears with rights="none", edit the policy file (usually /etc/ImageMagick-7/policy.xml) and comment out that line.
ImageMagick carries profiles through by default, so EXIF and ICC data usually survive a conversion. That is good for colour accuracy and bad for privacy — phone photos can contain GPS coordinates.
magick input.avif -strip output.jpg
-strip removes EXIF, IPTC, XMP and the ICC profile. Be aware of the side effect: dropping a wide-gamut ICC profile without converting the pixels can shift colours. If colour matters, convert the profile first rather than deleting it.
ffmpeg -i input.avif output.jpg. ImageMagick is better for batch work, resizing, watermarking and file-size targets; ffmpeg has the edge with animated AVIF, where it can decode every frame.-quality 85 and -sampling-factor 4:2:0, or accept the larger file.-quality 100 lossless?No. JPEG is lossy at every quality setting; 100 merely minimises the loss. For a lossless intermediate, write PNG or TIFF and compress at the end.mogrify overwrite my AVIF files?No. -format jpg writes new files with a different extension; the originals are untouched. Without -path, the JPGs land beside the sources.magick mogrify -format jpg -quality 92 *.avif works the same in PowerShell and Command Prompt, provided ImageMagick is on your PATH.