Compress image
compress_imageReduce image file size without changing format. Re-encode JPG, WebP, or AVIF at a set quality, or losslessly recompress PNG to shrink file size.
Instructions
Smaller file, same format. jpg/webp/avif re-encode at quality (default 80, mozjpeg for jpg); png is recompressed losslessly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | ||
| output | No | Output file path. Default: next to the input, with a suffix and the right extension. | |
| preview | No | Attach a small JPEG preview to the result (default true). | |
| quality | No | Lossy quality 1-100 (default 80). Ignored for png. |