Infery.ai
← All tools

Convert image format

Image

image.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 modalityImage file (URL)
Output modalityImage file (GCS URL)
Max input size50 MB
Supported input formatsJPEG, PNG, WebP, TIFF, AVIF, GIF
Supported output formatspng, jpeg, webp

Parameters

ParamRequiredDescription
formatyesTarget format — png, jpeg, or webp.
qualitynoInteger 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 format
  • image.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
}