Built for AI Workflows

AI Agents Don't Have Time to Fix Your Environment Bugs

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.

terminal — bash
$
{
"success": true,
"processed": 24,
"failed": 0,
"totalInputSize": "12.4 MB",
"totalOutputSize": "2.1 MB",
"compressionRatio": "83%",
"files": [
{
"input": "hero.jpg",
"output": "hero.webp",
"saved": "89%"
},
{
"input": "product-01.jpg",
"output": "product-01.webp",
"saved": "81%"
},
"... 22 more files"
]
}
✓ 24 files processed in 1.2s — 83% smaller

The Problem

Your Image Tool Is Breaking Your Agent

Every dependency is a potential point of failure for your AI workflows.

pip install fails in sandboxed environments

Pillow requires compiled C extensions. Sandboxed agents and restricted Docker containers say no.

ImageMagick version mismatches break CI

v6 vs v7 API differences. Missing delegates. System package conflicts. Your pipeline fails at 3am.

Cloud APIs leak your data

Sending images to external APIs means compliance risk, latency, rate limits, and cost per image.

Complex setup = unpredictable agent behavior

When environment setup is fragile, your agent can't reason about tool failures vs actual errors.

The Solution

One Binary. Total Predictability.

getwebp is designed from the ground up for programmatic use.

Single Static Binary

No runtime. No dependencies. No pip, brew, apt-get. Just download and run. Works in Docker FROM scratch.

Solved

Structured JSON Output

Every operation returns machine-parseable JSON. Your agent reads success, stats, and errors without parsing human text.

Solved

Deterministic Behavior

Same binary, same behavior, everywhere. macOS, Linux, Windows, ARM, x86. Your agent knows exactly what to expect.

Solved

AI-Friendly Features

Designed for Programmatic Control

Zero Dependencies

npm install nothing. apt-get nothing. Just run it. No native bindings, no system libraries, no surprises.

$ getwebp ./images
No setup required

JSON Output Mode

Every operation returns structured JSON. Parse it, log it, act on it. Perfect for LLM tool-use patterns.

--json flag

Stdin / Stdout Support

Pipe-native. Read from stdin, write to stdout. Compose with any shell command or AI tool chain.

Pipe-friendly

True Batch Processing

Process 1000 images in one command. Get one JSON array back with per-file results. No loops needed.

1000 files, 1 command

Predictable Exit Codes

0 = success, non-zero = failure. Your agent knows immediately without parsing output.

Agent-readable

Cross-Platform Binary

Same binary, same behavior on macOS, Linux, Windows, ARM, x86. CI and local always match.

Universal

Code Examples

Drop It Into Any Workflow

#!/bin/bash
# Process images and parse JSON output
RESULT=$(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 1
fi
JSON Output

Machine-Readable by Default

When you pass --json, every operation returns structured data your agent can reason about.

Try an operation:
Input Command
Exit code: 0
$getwebp hero.jpg --json
JSON Output
{
  "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"
}
Ecosystem

Works Seamlessly With Your AI Stack

No custom adapters needed. If it can run a shell command, it works with getwebp.

Claude CodeAI Coding
GitHub ActionsCI/CD
DockerContainers
n8nAutomation
PythonScripting
Bash / ShellShell

Works with any tool that can run a shell command

Why getwebp

The AI-Friendly Choice

Compared to other image processing tools for programmatic workflows.

FeaturesgetwebpBest for AIImageMagickPillowCloudinary APIsharp (Node)
Zero dependencies
JSON output
100% offline / local
Single binary
Predictable exit codes
Batch JSON array output
Cross-platform identical
AI-agent ready
Real Workflows

How AI Teams Use getwebp

LLM Image Preprocessing Pipeline

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

User Inputimage path
getwebpresize + compress
Vision APIGPT-4V / Claude
Resultparsed JSON

Example

python
# 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 photos

FAQ

Common Questions from AI Developers

Your Agents Are Waiting.

Stop Fighting Dependencies.

One command. Zero setup. JSON output. The image tool your AI stack has been missing.

npx getwebp@latest --help

No signup. No credit card. Works offline.