Zero Dependencies
npm install nothing. apt-get nothing. Just run it. No native bindings, no system libraries, no surprises.
$ getwebp ./images
getwebp is the world's most AI-friendly local image processing node. One binary. Zero dependencies. JSON output. Works anywhere your agent runs.
GetWebP is a zero-dependency, WASM-powered image optimizer built for AI agent workflows. It accepts JSON structured output, reads from stdin/stdout, and converts PNG, JPG, GIF, TIFF, and BMP to WebP and AVIF — all locally, with no cloud uploads and no API keys. A single npx command installs everything an AI agent needs to process images in CI/CD pipelines, coding assistants, or autonomous workflows.
The Problem
Every dependency is a potential point of failure for your AI workflows.
Pillow requires compiled C extensions. Sandboxed agents and restricted Docker containers say no.
v6 vs v7 API differences. Missing delegates. System package conflicts. Your pipeline fails at 3am.
Sending images to external APIs means compliance risk, latency, rate limits, and cost per image.
When environment setup is fragile, your agent can't reason about tool failures vs actual errors.
The Solution
getwebp is designed from the ground up for programmatic use.
No runtime. No dependencies. No pip, brew, apt-get. Just download and run. Works in Docker FROM scratch.
Every operation returns machine-parseable JSON. Your agent reads success, stats, and errors without parsing human text.
Same binary, same behavior, everywhere. macOS, Linux, Windows, ARM, x86. Your agent knows exactly what to expect.
AI-Friendly Features
npm install nothing. apt-get nothing. Just run it. No native bindings, no system libraries, no surprises.
$ getwebp ./images
Every operation returns structured JSON. Parse it, log it, act on it. Perfect for LLM tool-use patterns.
--json flagPipe-native. Read from stdin, write to stdout. Compose with any shell command or AI tool chain.
Pipe-friendlyProcess 1000 images in one command. Get one JSON array back with per-file results. No loops needed.
1000 files, 1 command0 = success, non-zero = failure. Your agent knows immediately without parsing output.
Agent-readableSame binary, same behavior on macOS, Linux, Windows, ARM, x86. CI and local always match.
UniversalCode Examples
#!/bin/bash# Process images and parse JSON outputRESULT=$(getwebp ./images/*.jpg --json)if [ $? -eq 0 ]; then SAVED=$(echo $RESULT | jq -r '.compressionRatio') COUNT=$(echo $RESULT | jq -r '.processed') echo "✓ Processed $COUNT files, saved $SAVED"else echo "✗ Error: $(echo $RESULT | jq -r '.error')" exit 1fiimport subprocessimport jsonresult = subprocess.run( ["getwebp", "./images", "--json"], capture_output=True, text=True)if result.returncode == 0: data = json.loads(result.stdout) print(f"✓ Processed {data['processed']} files") print(f" Saved {data['compressionRatio']} ({data['totalInputSize']} → {data['totalOutputSize']})")else: error = json.loads(result.stderr) raise RuntimeError(f"getwebp failed: {error['error']}")- name: Optimize images run: | npx getwebp@latest ./public/images \ --json > optimization-report.json SAVED=$(cat optimization-report.json | jq -r '.compressionRatio') echo "Images optimized: $SAVED smaller"- name: Upload report uses: actions/upload-artifact@v4 with: name: image-optimization-report path: optimization-report.jsonFROM node:20-alpine# getwebp is a single binary — no system deps neededRUN npx getwebp@latest --install-binary /usr/local/bin/getwebpCOPY ./images /app/imagesRUN getwebp /app/images --json > /app/result.json \ && cat /app/result.json | jq '.compressionRatio'When you pass --json, every operation returns structured data your agent can reason about.
{ "success": true, "operation": "convert", "input": { "file": "hero.jpg", "size": "1.2 MB", "format": "JPEG" }, "output": { "file": "hero.webp", "size": "142 KB", "format": "WebP" }, "saved": "88%", "duration": "0.3s" }
No custom adapters needed. If it can run a shell command, it works with getwebp.
Works with any tool that can run a shell command
Compared to other image processing tools for programmatic workflows.
| Features | getwebpBest for AI | ImageMagick | Pillow | Cloudinary API | sharp (Node) |
|---|---|---|---|---|---|
| Zero dependencies | |||||
| JSON output | |||||
| 100% offline / local | |||||
| Single binary | |||||
| Predictable exit codes | |||||
| Batch JSON array output | |||||
| Cross-platform identical | |||||
| AI-agent ready |
Before sending images to vision models, resize and compress them to reduce token costs by up to 80%. getwebp handles the whole batch in one JSON-returning command.
Workflow
Example
# Reduce image size before sending to GPT-4V
result = subprocess.run([
"getwebp", image_path,
"--resize", "1024x1024",
"--json"
], capture_output=True, text=True)
data = json.loads(result.stdout)
# Tokens saved: ~80% for typical product photosFAQ
Stop Fighting Dependencies.
One command. Zero setup. JSON output. The image tool your AI stack has been missing.
No signup. No credit card. Works offline.
Every GetWebP product runs on the same WASM converter - pick the surface that fits your workflow.
Model Context Protocol server that gives Claude, Cursor, and Windsurf local image conversion.
Zero-dependency command-line converter. One npx command, runs in any terminal or CI pipeline.
Local-first integration surfaces - CLI in your shell, MCP in your agent. Zero AWS bill.