Back to feed
Dev.to
Dev.to
7/11/2026
Convert a whole folder of images to WebP — locally, no upload, one command

Convert a whole folder of images to WebP — locally, no upload, one command

Short summary

A tutorial walks through using @assetopt/cli, an open-source MIT-licensed CLI tool, to batch-convert JPG and PNG images to WebP format locally without uploading files anywhere. The tool supports dry-run analysis with before/after size reporting, incremental caching for fast re-tuning, and automatic routing of transparent images to AVIF. Concrete benchmarks show PNG-to-WebP savings of ~90% and JPEG-to-WebP savings of ~17% on sample assets.

  • Batch-convert images to WebP locally with @assetopt/cli — no upload, no account needed
  • Dry-run analyze mode reports per-file savings before committing; incremental cache speeds re-tuning
  • Sample benchmarks: PNG→WebP saves ~90%, JPEG→WebP saves ~17%; transparent PNGs can auto-route to AVIF

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more