There’s a reason Image Alchemy became indispensable in the early 1990s: it did in one command what would otherwise take a dozen manual steps. In 2026 two open-source tools carry the same torch — ImageMagick and ffmpeg — and they compose cleanly into scripts, CI pipelines and build tools no GUI can match.
01ImageMagick: the Swiss army knife
ImageMagick ↗’s flagship command is magick (version 7 unified the old convert and mogrify binaries). It reads the output format from the extension and switches codecs automatically:
magick in.png out.webp
magick in.png -quality 82 out.webp
magick in.png -define webp:lossless=true out.webpWhere it earns its keep is batch work. A magick mogrify loop reformats a whole asset library in one line — add -resize and -strip to resize and drop EXIF in the same pass:
magick mogrify -format webp -resize 1200x -quality 80 -strip *.jpg02ffmpeg: not just for video
ffmpeg ↗ is an exceptional image processor — especially for AVIF, via its libavif/AV1 integration. The syntax differs from ImageMagick but is equally composable; -still-picture 1 signals a single still rather than a video sequence:
ffmpeg -i in.png -still-picture 1 out.avif
ffmpeg -i in.jpg -c:v libaom-av1 -crf 28 -cpu-used 4 -still-picture 1 out.avifIt’s also the right tool for extracting frames from video or converting an animated GIF into a WebP animation.
03Composing both in a pipeline
The two complement each other: ImageMagick to batch-resize and strip metadata, ffmpeg to hand off for AVIF encoding, a shell loop or Makefile tying the stages together. Both run on Linux, macOS and Windows, and both are scriptable from Node or Python.