Fast parallel processing with Worker Threads. Automatic reference replacement in your code. Zero configuration required.
$ npx elo-img-to-webp-converter --dry-run
A complete solution for image optimization with zero configuration
Uses Worker Threads to convert multiple images simultaneously, dramatically reducing conversion time.
Automatically finds and replaces image references in your JS, TS, CSS, HTML, Vue, Svelte, and Astro files.
Configurable batch sizes optimize memory usage and processing speed for projects of any size.
Preview all changes before applying them. See exactly what will be converted and replaced.
Control quality, workers, batch size, and more. Keep originals or replace them entirely.
Works out of the box with sensible defaults. Just run npx and you're done.
Get a detailed summary table showing file paths, original sizes, WebP sizes, and space saved percentage.
Real-world examples to get you started quickly
# Convert all images in current directory
npx elo-img-to-webp-converter
# Output:
🖼️ Image to WebP Converter
📸 Found 12 images
📦 Processing 2 batches with 4 workers
✓ Batch 1/2 completed (10/10 images)
✓ Batch 2/2 completed (2/2 images)
✅ Converted 12 images to WebP
📊 Conversion Summary
┌────────────────────────────┬──────────┬──────────┬────────┐
│ File │ Original │ WebP │ Saved │
├────────────────────────────┼──────────┼──────────┼────────┤
│ src/assets/hero.jpg │ 245 KB │ 62 KB │ 74.7% │
│ src/assets/banner.png │ 180 KB │ 48 KB │ 73.3% │
│ src/assets/gallery/01.jpg │ 120 KB │ 35 KB │ 70.8% │
│ ... │ ... │ ... │ ... │
├────────────────────────────┼──────────┼──────────┼────────┤
│ TOTAL │ 1.8 MB │ 485 KB │ 73.6% │
└────────────────────────────┴──────────┴──────────┴────────┘
💾 Total space saved: 1.34 MB (73.6%)
✅ Updated 8 files (32 references)
✨ All done!
# Preview changes with high quality setting
npx elo-img-to-webp-converter \
--quality 90 \
--dry-run
# Keep originals and use more workers
npx elo-img-to-webp-converter \
--keep-original \
--workers 8 \
--batch-size 20
# Skip reference replacement
npx elo-img-to-webp-converter --no-replace
No installation required — just use npx
Open your terminal and cd into your project directory
Use dry-run mode to see what will be converted without making changes
Execute the converter to transform all images and update references