WebP to AVIF Conversion

To convert WebP to AVIF, run npx optimo image.webp --format avif. AVIF can be smaller than WebP for photo-heavy content. Optimo handles format conversion and optimization in a single step.

Command

Convert a file by targeting the output format:

npx optimo image.webp --format avif

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

Why convert?

  • AVIF can be smaller than WebP for photo-heavy content.
  • Useful when chasing aggressive performance budgets.

Format notes

WebP

Modern image format with great compression and broad browser support.

Optimize WebP Compress WebP Resize WebP WebP guide

AVIF

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

Optimize AVIF Compress AVIF Resize AVIF AVIF guide

Not sure which to use?

If you're choosing a delivery format, here's a quick comparison.

WebP vs AVIF