Convert image
convert_imageConvert a local image (JPEG, PNG, WebP, AVIF, GIF, TIFF, HEIC) to JPEG, PNG, WebP, or AVIF on your machine without uploading. Writes a new file, avoids overwrites, and returns output path and sizes.
Instructions
Convert one local image (JPEG, PNG, WebP, AVIF, GIF, TIFF, HEIC/HEIF) to jpeg, png, webp or avif. Runs entirely on this machine; nothing is uploaded. Paths are relative to the allowed root (/app). Writes a new file and never overwrites existing ones. Returns the output path and sizes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Path of the source image, relative to the allowed root (absolute paths inside the root also work). Example: photos/IMG_0001.heic | |
| format | Yes | Output format: jpeg, png, webp or avif. | |
| quality | No | Quality 0.5-1.0 for jpeg/webp/avif (default 0.85; 1.0 = lossless for webp/avif). Ignored for png. | |
| outputDir | No | Directory for the result, relative to the allowed root. Created if missing. Default: same directory as the input. | |
| keepMetadata | No | Keep EXIF/XMP metadata such as camera and GPS data. Default false: metadata is stripped (images are auto-rotated first). |