Optimize WebP for the web

Modern image format with great compression and broad browser support.

Last updated: 2026-03-18

To optimize WebP images, run npx optimo image.webp. Optimo applies format-specific ImageMagick-powered compression that typically reduces WebP 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.webp

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

When to use WebP

  • web images
  • thumbnails
  • mixed photo + graphics

Trade-offs

  • Not universally supported by legacy tooling

Related formats

Related conversions

Compare formats

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

Frequently asked questions

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