Convert image
convert_imageConvert images between JPEG, PNG, WebP, and AVIF with transparency preserved; JPEG output is flattened onto a background. Supports GIF, TIFF, or HEIC input locally without uploading.
Instructions
Convert between jpeg, png, webp and avif (the input may also be GIF, TIFF or HEIC). Transparency is kept except for jpeg, which is flattened onto background.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | ||
| format | 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. | |
| background | No | CSS color used to flatten transparency when the output is jpeg (default #ffffff). |