← All tools
Convert image format
Imageimage.convert_format
in: imageout: image
Convert image to png / jpeg / webp.
Pricing
- Price
- 0.125 cr / request
Prices in credits (1 credit = $0.01).
Convert Image Format
Re-encode an image to PNG, JPEG, or WebP with optional quality control.
When to use
- Reduce file size — convert PNG screenshots to JPEG or WebP for web delivery.
- Ensure transparency — convert JPEG to PNG or WebP when alpha channel is needed downstream.
- Quality/size trade-off — lower JPEG/WebP quality (e.g. 75) for bandwidth-constrained environments.
Inputs & outputs
| Input modality | Image file (URL) |
| Output modality | Image file (GCS URL) |
| Max input size | 50 MB |
| Supported input formats | JPEG, PNG, WebP, TIFF, AVIF, GIF |
| Supported output formats | png, jpeg, webp |
Parameters
| Param | Required | Description |
|---|---|---|
format | yes | Target format — png, jpeg, or webp. |
quality | no | Integer 1–100. Applies to jpeg and webp. Ignored for png. |
Examples
PNG to JPEG at quality 80
{
"type": "image.convert_format",
"input": { "image_url": "gs://infery-prod-media/assets/screenshot.png" },
"params": { "format": "jpeg", "quality": 80 }
}
Convert to WebP for modern browsers
{
"type": "image.convert_format",
"input": { "image_url": "gs://infery-prod-media/photos/hero.jpg" },
"params": { "format": "webp", "quality": 85 }
}
Pricing
Billed per megapixel of output image. See pricing dashboard for current rates.
Related capabilities
image.resize— resize before converting formatimage.flatten— remove alpha before converting to JPEG (alpha not supported in JPEG)image.pipeline— chain format conversion with other ops in a single execution
Examples
PNG → JPEG quality 80
{
"format": "jpeg",
"quality": 80
}