Image Transforms
Resize Image
Resize an image. Provide width, height, or both.
GET/api/resize?url=&width=&height=
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | Required | Public http(s) URL of the source image (max 10 MB). |
| width | integer | Optional | Target width (1-4000). |
| height | integer | Optional | Target height (1-4000). |
| fit | string | Optional | cover (default), contain, fill, inside or outside. |
| background | string | Optional | Hex color used for padding with fit=contain. Default transparent. |
| format | string | Optional | Output format: png, jpeg, webp, avif or gif. |
| quality | integer | Optional | 1-100 for jpeg/webp/avif. Default 80. |
Try it
Saved only in this browser. Requests use your key and count toward your quota. Get a key
GET /api/resizeExample request
curl "https://your-app.com/api/resize?url=https%3A%2F%2Fexample.com%2Fphoto.jpg&width=300&height=200&fit=cover&format=webp" \
-H "x-api-key: YOUR_API_KEY" \
--output resized.webpResponse
Content-Type: image/png (or the requested format) — the resized image.