lazy webp

MIT - Node.js 18+ - macOS 14+

Batch convert images to WebP with zero config. Skips unchanged files automatically, processes directories in parallel, and works as a CLI or native macOS app.

lazywebp macOS app showing 26 files converted with 65% average savings

Usage

Quick Start

# zero-install (npx)
npx lazywebp photo.png

# or install globally
npm install -g lazywebp
lazywebp photo.png

Examples

# convert multiple files
lazywebp a.png b.jpg c.gif

# convert a directory
lazywebp ./images

# custom quality (default: 90)
lazywebp -q 80 ./photos

# recursive + output dir
lazywebp -r -o ./out ./src

Options

FlagDescription
-q, --qualityWebP quality 1-100 (default: 90)
-o, --outputOutput directory (default: same as source)
-r, --recursiveProcess subdirectories recursively
-h, --helpShow help
-v, --versionShow version

Features

CLI

Batch Processing

Smart Skipping

Concurrent Workers

Safe Writes

Color Space Aware

EXIF Auto-Rotation

Desktop App

Drag & Drop

Quality Slider

Per-File Savings

Menu Bar Icon

Launch at Login

Always on Top

macOS App

Native SwiftUI desktop app with drag-and-drop conversion. Drop image files or folders onto the window and watch them convert in real time. This is a developer tool you build locally — not a downloadable consumer app.

Build from source

git clone https://github.com/keiver/lazywebp.git
cd lazywebp/app
./install-app.sh
Requires lazywebp CLI installed globallymacOS 14+Swift 6.2+
lazywebp macOS app empty drop zone ready to receive files
Drop zone
lazywebp macOS app showing 2 files converted with per-file savings
Completed conversion

Frequently Asked Questions

What image formats does lazywebp support?

JPG, JPEG, PNG, GIF, BMP, TIFF, and WebP. The CLI scans the input directory for files matching these extensions (case-insensitive) and converts each one to WebP format.

How does the skip logic work?

Before converting, lazywebp compares the modification time (mtime) of the source file against the existing output file. If the output is newer than the source, conversion is skipped. This makes repeated runs fast — only new or modified images get re-converted.

Can I use the macOS app without the CLI?

No. The macOS app is a native SwiftUI wrapper that calls the lazywebp CLI under the hood. You need to install the CLI globally via npm first, then the app uses it for the actual image conversion.

What quality setting should I use?

The default is 90, which works well for most use cases. For photographs where file size matters more, try 80-85. For graphics, illustrations, or UI screenshots where sharpness is critical, use 90-95.

Does it preserve original files?

Yes. lazywebp never modifies or deletes source files. It writes converted WebP files to the output directory using safe writes — data goes to a temporary file first, then gets renamed only after successful conversion.

How does concurrent processing work?

lazywebp uses sharp's built-in concurrency to run up to 4 parallel conversions. Sharp's libvips thread pool distributes work across CPU cores automatically during large batch conversions.