FFWebP is a small, single-binary CLI for converting images between formats, think "ffmpeg for images". It auto-detects the input format, lets you pick the output format by file extension or `--codec`, supports stdin/stdout, thumbnails, and rich per-codec options.
Force output codec (if the output name has no or different extension)
```bash
ffwebp -i in.png -o out.any -c jpeg
```
Quality and lossless
```bash
# Lossy quality (0–100, defaults to 85)
ffwebp -i in.png -o out.webp -q 82
# Force lossless (overrides quality)
ffwebp -i in.png -o out.webp --lossless
```
Thumbnails
```bash
# Create a thumbnail no larger than 256x256
ffwebp -i big.jpg -o thumb.webp -t 256
```
Silence logs
```bash
ffwebp -i in.jpg -o out.png -s
```
## Codec Options
Each codec exposes its available options via namespaced flags (for example, `--webp.method`, `--tiff.predictor`, `--psd.skip-merged`). Run `ffwebp --help` to see all global and codec-specific flags for your build.
If `--codec` is omitted, the output codec is chosen from the output file extension. If the output filename has no extension, pass `--codec`.
## How It Works
- Input sniffing: the input codec is detected by reading magic bytes; if you provide an input filename, its extension is considered.
- Output selection: the output codec is inferred from the destination extension or forced via `--codec`.
- Timing and sizes: ffwebp prints info like decode/encode timings and output size unless `--silent` is set.