v1.0.0 — Ready for production

Convert images to WebP
in seconds

Fast parallel processing with Worker Threads. Automatic reference replacement in your code. Zero configuration required.

$ npx elo-img-to-webp-converter --dry-run

Everything you need

A complete solution for image optimization with zero configuration

Parallel Processing

Uses Worker Threads to convert multiple images simultaneously, dramatically reducing conversion time.

🔄

Auto Reference Update

Automatically finds and replaces image references in your JS, TS, CSS, HTML, Vue, Svelte, and Astro files.

📦

Batch Processing

Configurable batch sizes optimize memory usage and processing speed for projects of any size.

🔍

Dry Run Mode

Preview all changes before applying them. See exactly what will be converted and replaced.

⚙️

Fully Configurable

Control quality, workers, batch size, and more. Keep originals or replace them entirely.

🚀

Zero Config

Works out of the box with sensible defaults. Just run npx and you're done.

📊

Conversion Summary

Get a detailed summary table showing file paths, original sizes, WebP sizes, and space saved percentage.

See it in action

Real-world examples to get you started quickly

Basic Conversion Quick Start
# 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%  │
│ ...                        │ ...      │ ...      │ ...    │
├────────────────────────────┼──────────┼──────────┼────────┤
│ TOTAL1.8 MB485 KB73.6%  │
└────────────────────────────┴──────────┴──────────┴────────┘

💾 Total space saved: 1.34 MB (73.6%)
✅ Updated 8 files (32 references)

✨ All done!
High Quality with Preview Advanced
# 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

Up and running in seconds

No installation required — just use npx

1

Navigate to your project

Open your terminal and cd into your project directory

cd /path/to/your/project
2

Preview the changes (optional)

Use dry-run mode to see what will be converted without making changes

npx elo-img-to-webp-converter --dry-run
3

Run the conversion

Execute the converter to transform all images and update references

npx elo-img-to-webp-converter

CLI Options

Customize the behavior to fit your needs

Option Alias Description Default
--quality -q WebP quality (0-100) 80
--workers -w Max parallel workers 4
--batch-size -b Images per batch 10
--keep-original -k Keep original images after conversion false
--dry-run -d Preview changes without applying false
--no-replace Skip reference replacement in code false