Optimize AVIF for the web

High-compression modern image format that can beat WebP on size at similar quality.

Last updated: 2026-03-18

To optimize AVIF images, run npx optimo image.avif. Optimo applies format-specific ImageMagick-powered compression that typically reduces AVIF file size by 15–40% without visible quality loss. The original file is kept if the output is not smaller.

Command

Start here. Run optimo on a image file:

npx optimo image.avif

Tip: add --dry-run to preview changes.

When to use AVIF

  • high-volume sites
  • photo-heavy pages
  • performance budgets

Trade-offs

  • Slower encode
  • Some older clients may not support it

Related formats

Related conversions

Compare formats

If you're picking a delivery format, comparisons can help.

Frequently asked questions

How do I optimize AVIF files?
Run "npx optimo image.avif" in your terminal. Optimo applies format-specific ImageMagick-powered compression that reduces AVIF file size while preserving quality. The original file is kept if the optimized output is not smaller.
Is AVIF optimization lossless?
By default, optimo uses lossless optimization for AVIF. For additional compression, add the --lossy flag to allow minor quality trade-offs for significantly smaller files.
What tools does optimo use for AVIF?
Optimo uses ImageMagick, MozJPEG, and SVGO (depending on format) under the hood with format-specific settings tuned for AVIF files.