services / image-resize
visualoperational · 5 ms
Image Resize & Convert
Resize, crop-fit and convert images (PNG, JPEG, WebP, AVIF, GIF, TIFF, SVG input) to webp, png, jpeg or avif. Auto-rotates by EXIF. Use to shrink screenshots before sending them to a vision model, create thumbnails, or convert formats. Params: image_base64 or image_url (one required), width, height (max 4096), fit (inside default | cover | contain | fill), format (webp default), quality (1-100, default 80).
Run free trial ↗1 free call per day with the example input. Paid: $0.003 USDC, no limit.
Call it
Input
| Field | Type | Description |
|---|---|---|
| image_base64 | string | Base64 image data (data: URI prefix allowed) |
| image_url | string | Public URL of the image (max 15 MB) |
| width | integer | |
| height | integer | |
| fit | inside | cover | contain | fill = "inside" | |
| format | webp | png | jpeg | avif = "webp" | |
| quality | integer = 80 |
Output
| Field | Type | Description |
|---|---|---|
| image_base64 | string | |
| format | string | |
| width | integer | |
| height | integer | |
| size_bytes | integer | |
| original | object |
Example response (data)
{
"image_base64": "UklGRiQAAABXRUJQVlA4...",
"format": "webp",
"width": 320,
"height": 200,
"size_bytes": 6120,
"original": {
"width": 1280,
"height": 800,
"format": "png",
"size_bytes": 214000
}
}