PicToWebP

Browser Edition Star on GitHub
Runs 100% on your machine No tracking, no analytics EXIF & GPS stripped by default
Quality 80 / 100
Smallest fileBest quality
Lossless
Keep every pixel , no quality loss, larger files
Strip metadata
Remove camera info and GPS tags for smaller files
Pick a folder to convert
or drop a folder or images anywhere on this page

Tip: press B to pick a folder, Enter to convert.

Run it locally

One signed binary: no runtime, no admin rights, no PATH edits. The installer checks the SHA-256 from the release manifest before it writes anything.

Install
curl -fsSLO https://github.com/aditya-xq/pictowebp/releases/download/rust-latest/install.sh
sh install.sh --json
Check it worked
pictowebp --info --json
{
  "schema": "pictowebp.info/v1",
  "name": "pictowebp",
  "edition": "rust",
  "version": "0.4.0",
  "target": "x86_64-unknown-linux-musl",
  "exe": "/home/you/.local/bin/pictowebp",
  "capabilities": ["json", "info", "non_interactive", "interactive", "dry_run",
                   "out_dir", "single_file", "fail_on_error", "fail_on_empty",
                   "lossless", "keep_metadata", "mcp"]
}

Installs to ~/.local/bin without touching PATH. Add --require-attestation if you have gh 2.49+ and want the Sigstore attestation enforced.

Building from source, or running the Python edition's local server? See CONTRIBUTING.md. The Python package is not published on PyPI, so pip install pictowebp does not exist yet.

Use it from your agent

The skill teaches a coding agent to detect the CLI, install it only if it is missing, and convert with --json so nothing has to parse a human summary.

Install the skill
npx skills add https://xqbuilds.com/pictowebp/

What the agent gets

  • One --json object on stdout, human logs on stderr.
  • Stable exit codes: 0 ok, 2 bad path or arguments, 3 nothing converted, 4 failures with --fail-on-error, 5 empty with --fail-on-empty, 130 cancelled.
  • --dry-run before a large batch, and --info --json to detect capabilities instead of guessing a version.

MCP Rust 0.4.0+

  • pictowebp --mcp serves info and convert over stdio JSON-RPC.
  • Local only: no prompts, no network, same payloads as the CLI.

Manual install

  • The skill is published at .well-known/agent-skills/pictowebp/.
  • Drop that folder into any agent's skills directory if it has no installer.
MCP client config
{
  "mcpServers": {
    "pictowebp": {
      "command": "pictowebp",
      "args": ["--mcp"]
    }
  }
}

The installer does not edit PATH. If pictowebp is not resolvable, use the absolute path it printed, or set PICTOWEBP_BIN.

Which edition

Same conversion rules everywhere. What differs is metadata, lossless mode, and whether you need a runtime at all.

Browser

This page. Encodes with your browser's canvas, no install.

  • Lossless: no
  • Metadata: cannot be preserved
  • MCP: no
  • Runtime: none

Rust CLI

The signed binary. Fastest on large batches.

  • Lossless: yes
  • Metadata: stripped by default, can be kept
  • MCP: yes, --mcp
  • Runtime: none

CLI reference

The same flags and exit codes in every edition. The normative contract is docs/agent-contract.md.

Command-line flags
FlagBehaviour
-q, --quality N1-100, default 80.
-t, --threads NWorker threads, default all cores.
--out DIROutput folder; must be missing or empty.
--dry-runReport what would happen, write nothing.
--jsonOne object on stdout; implies --no-progress.
--infoPrint edition, version and capabilities, then exit.
--losslessLossless WebP, larger files.
--keep-metadataKeep EXIF and GPS, stripped by default.
--report PATHWrite a failure report inside the output folder.
--max-pixels NDecode cap, default 500000000.
--fail-on-errorExit 4 when anything fails.
--fail-on-emptyExit 5 when nothing is convertible.
--mcpRun a local stdio MCP server. Rust only.
Exit codes
ExitMeaning
0Success, including partial failures.
1Unexpected internal error.
2Invalid arguments, or an unusable source or output path.
3Nothing converted; never returned by --dry-run.
4A failure or collision with --fail-on-error.
5No convertible images with --fail-on-empty.
130Cancelled by the user.