Convert HEIC / HEIF (the iPhone capture format) to WebP. Configurable quality, optional lossless mode, edge-cached.
Takes an HEIC or HEIF image and returns the same picture as
WebP. WebP at quality 75 is roughly the perceptual equivalent
of JPEG at quality 85 with 25-35% smaller files — a useful
default for serving images to modern browsers.
Set `lossless: true` for a pixel-perfect round-trip (the HEIC
itself is still lossy upstream, but no further loss is added).
Animated HEIC sequences are not supported — only the primary
image is converted.
Limits to be aware of:
- Maximum image size: 5 megapixels.
- iPhone tile-grid captures (full-resolution photos with the HDR
gain map) are rejected with a clear error pointing you to
re-export the photo at a lower resolution first.
Inputs
Name
Type
Default
Description
image*
file
—
HEIC or HEIF image bytes.
quality
number (1…100)
75
WebP quality 1–100. Default 75. Ignored when `lossless` is true.