Image Optimization that Just Works. Anywhere.
No C++ bindings. No native deps. Just install and run — in your terminal, your CI pipeline, or your AI agent's tool belt.
GetWebP CLI is a zero-dependency, WASM-powered command-line image optimizer that converts PNG, JPG, GIF, TIFF, and BMP to WebP and AVIF. It runs entirely on your machine with no cloud uploads, no native bindings, and no privacy trade-offs. One npx command installs everything — ready for terminals, CI/CD pipelines, and AI agent tool-use.
Stop Fighting Native Dependencies.
Zero C++ Bindings
No python, make, or g++ required. Install with a single npx command and run anywhere Node.js runs.
Single Binary / Pure WASM
~5MB WASM engine with zero native dependencies. Runs on Docker Alpine, CI runners, and serverless functions.
Predictable NDJSON Output
Built for pipelines and AI agents. Pass --json to get NDJSON — one envelope per line — with per-file output paths, quality, and status. Perfect for scripting and automation.
Structured NDJSON Output for Programmatic Use
Switch to AI Mode with --json and get machine-readable NDJSON output — one JSON envelope per line. Every file's output path, compression ratio, quality, and status — all in a structured payload your scripts and agents can parse without screen-scraping.
CLI Output Examples: Human & AI Modes
# Activate Pro license
$ getwebp auth XXXX-XXXX-XXXX-ABCD
Verifying license...
✓ Activated! Pro plan unlocked.
# Convert a directory of images (Pro: recursive, concurrent)
$ getwebp ./images -o ./images/webp -q 85
✓ hero.jpg
✓ banner.png
✓ product-shot.jpg
Done: 3 succeeded, 0 failed
Avg saved: 34.2%
# Check current license status
$ getwebp status
Version : 1.0.1
Mode : Pro
License : xxxx-xxxx-xxxx-ABCD
Expires : 2026-12-31
Devices : 1 / 3 used# Activate Pro license
$ getwebp auth XXXX-XXXX-XXXX-ABCD
Verifying license...
✓ Activated! Pro plan unlocked.
# Convert a directory of images (Pro: recursive, concurrent)
$ getwebp ./images -o ./images/webp -q 85
✓ hero.jpg
✓ banner.png
✓ product-shot.jpg
Done: 3 succeeded, 0 failed
Avg saved: 34.2%
# Check current license status
$ getwebp status
Version : 1.0.1
Mode : Pro
License : xxxx-xxxx-xxxx-ABCD
Expires : 2026-12-31
Devices : 1 / 3 used// $ getwebp ./images -o ./images/webp -q 85 --json
// One JSON object per line (NDJSON). First line: version preamble.
{"@timestamp":"2026-04-12T10:00:00.000Z","@level":"info","@message":"GetWebP CLI 1.3.0","@module":"getwebp.cli","type":"version","data":{"getwebp":"1.3.0","ui":"1"}}
// Last line: convert.completed summary with all results.
{"@timestamp":"2026-04-12T10:00:01.234Z","@level":"info","@message":"Converted 3/3 files","@module":"getwebp.convert","type":"convert.completed","data":{
"processed": 3,
"successCount": 3,
"failedCount": 0,
"results": [
{
"file": "images/hero.jpg",
"outputPath": "/abs/images/webp/hero.webp",
"originalSize": 204800,
"newSize": 134144,
"savedRatio": 0.345,
"saved": "34.5%",
"quality": 82,
"qualityMode": "auto",
"status": "success"
},
{
"file": "images/banner.png",
"outputPath": "/abs/images/webp/banner.webp",
"originalSize": 512000,
"newSize": 327680,
"savedRatio": 0.36,
"saved": "36.0%",
"quality": 85,
"qualityMode": "auto",
"status": "success"
},
{
"file": "images/product-shot.jpg",
"outputPath": "/abs/images/webp/product-shot.webp",
"originalSize": 163840,
"newSize": 102400,
"savedRatio": 0.375,
"saved": "37.5%",
"quality": 80,
"qualityMode": "auto",
"status": "success"
}
]
}}Drop It Into Your Workflow
name: Optimize Images
on:
push:
paths:
- 'public/images/**'
jobs:
optimize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install getwebp CLI
run: npm install -g getwebp
- name: Convert images to WebP
run: |
getwebp ./public/images --json > report.ndjson
# Check for failures: extract convert.completed and assert failedCount == 0
grep '"convert.completed"' report.ndjson | jq -e '.data.failedCount == 0'
- name: Upload NDJSON report
uses: actions/upload-artifact@v4
with:
name: webp-report
path: report.ndjsonFree is great for ad-hoc. Pro is built for pipelines.
| Feature | Free | Pro |
|---|---|---|
| Single directory conversion | ✓ | ✓ |
| Lossless / Lossy control | ✓ | ✓ |
| Unlimited recursive (-r) | — | ✓ |
| Multi-thread concurrency | — | ✓ |
| Unlimited JSON output (--json) | — | ✓ |
| Watch mode (--watch) | — | ✓ |
Developer FAQ
Yes, fully offline after install. The WASM engine runs entirely on your machine. License validation makes a single network call on activation, but image conversion itself never touches the internet.
Yes. Because it runs on pure WASM via Node.js, it works identically on macOS (Intel + Apple Silicon), Linux (x64 + ARM64), and Windows (x64). No platform-specific binaries required.
Sharp is a fantastic library but requires compiling native libvips bindings, which fails in Alpine Docker and serverless environments. getwebp uses a pure WASM engine — no compilation, no gyp, no native deps. It also ships as a CLI first, making it trivial to use in shell scripts and CI without writing Node.js code.
ImageMagick is a system-level tool that must be installed separately (apt-get, brew), varies by OS version, and has no structured output. getwebp is a self-contained Node.js package with consistent behavior everywhere and first-class JSON output for automation.
Yes. A single Pro license can be activated on up to 5 devices (CLI) and covers up to 3 WordPress sites. Need more? Contact us and we'll sort it out.
Related GetWebP tools
Every GetWebP product runs on the same WASM converter - pick the surface that fits your workflow.
MCP Server
Model Context Protocol server that gives Claude, Cursor, and Windsurf local image conversion.
For AI Agents
JSON-structured output, stdin/stdout I/O, exit codes - designed for autonomous agent tool-use.
WordPress Plugin
Convert your full media library to WebP and AVIF on your own server. No third-party API.