The Images API allows you to serve and transform images on-the-fly. You can resize, crop, apply effects, and optimize images for different use cases.
Access and serve an image, with optional transformations applied on-the-fly.
GET /file/:path| Parameter | Type | Description |
|---|---|---|
| path | String | The path to the image file |
| Parameter | Type | Description |
|---|---|---|
| format | String | jpeg, png, webp, avif, gif, tiff, bmp, or auto. Overrides the URL extension. Auto lets Get Pronto choose an efficient output format; bmp returns the original without conversion. |
| w | Integer | Width in pixels (1-5000) |
| h | Integer | Height in pixels (1-5000) |
| fit | String | Resize mode: cover, contain, fill, inside, outside |
| q | Integer | 'auto' | Quality (1-100), or auto to choose per image; defaults to 80 when encoding |
| blur | Number | Blur radius (0.3-1000) |
| sharp | Boolean | Apply sharpening |
| gray | Boolean | Convert to grayscale |
| rot | Integer | Rotation angle (-360 to 360) |
| border | String | Format: 'width_hexcolor' (e.g., '5_FF0000') |
| crop | String | Format: 'x,y,width,height' |
curl "https://api.getpronto.io/v1/file/user-123/image.jpg?w=800&h=600&fit=cover&format=auto&q=auto"Returns image bytes with the appropriate Content-Type. This delivery URL is public and requires no API key. Start with your uploaded file's secureUrl and preserve its full path.
Generate a public image URL with specified transformations. This management endpoint requires a secret API key; loading the generated URL does not require authentication.
POST /file/:id/transform-url| Parameter | Type | Description |
|---|---|---|
| id | String | The unique identifier of the image |
| Parameter | Type | Description |
|---|---|---|
| w | Integer | Width in pixels (1-5000) |
| h | Integer | Height in pixels (1-5000) |
| fit | String | Resize mode: cover, contain, fill, inside, outside |
| q | Integer | 'auto' | Quality (1-100), or auto to choose per image; defaults to 80 when encoding |
| blur | Number | Blur radius (0.3-1000) |
| sharp | Boolean | Apply sharpening |
| gray | Boolean | Convert to grayscale |
| rot | Integer | Rotation angle (-360 to 360) |
| border | String | Format: 'width_hexcolor' (e.g., '5_FF0000') |
| crop | String | Format: 'x,y,width,height' |
| format | String | jpeg, png, webp, avif, gif, tiff, bmp, or auto. Auto lets Get Pronto choose an efficient output format; bmp returns the original without conversion. |
curl -X POST https://api.getpronto.io/v1/file/123e4567-e89b-12d3-a456-426614174000/transform-url \
-H "Authorization: ApiKey YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"w": 800,
"h": 600,
"fit": "cover",
"q": 90,
"format": "webp"
}'{
"url": "https://api.getpronto.io/v1/file/user-123/image.webp?w=800&h=600&fit=cover&q=90&format=webp",
"originalFile": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"filename": "image.jpg",
"mimetype": "image/jpeg"
},
"transformations": {
"w": 800,
"h": 600,
"fit": "cover",
"q": 90,
"format": "webp"
}
}The following transformations can be applied to images either via URL parameters or through the transform URL endpoint:
| Parameter | Type | Description |
|---|---|---|
| w, h | Integer | Target dimensions (1-5000px). Images are not enlarged beyond their source dimensions. Supply one dimension to preserve the aspect ratio; w=auto and h=auto are not supported. |
| fit | String | How image fits: cover (default), contain, fill, inside, outside |
Example: w=800&h=600&fit=cover
| Parameter | Type | Description |
|---|---|---|
| q | Integer | 'auto' | Output quality (1-100), or 'auto' to pick a level per image |
Example: q=auto
| Parameter | Type | Description |
|---|---|---|
| format | String | Overrides the URL extension. Auto lets Get Pronto choose an efficient output format; SVG and BMP originals are passed through. The result does not vary by browser. |
Example: format=auto
| Parameter | Type | Description |
|---|---|---|
| blur | Number | Gaussian blur (0.3-1000) |
| sharp | Boolean | Sharpen the image |
| gray | Boolean | Convert to grayscale |
Example: blur=5&sharp=true&gray=true
| Parameter | Type | Description |
|---|---|---|
| rot | Integer | Rotation angle (-360 to 360) |
| crop | String | Crop coordinates (x,y,width,height) |
Example: rot=90&crop=100,100,500,500
Note: Transformations use a fixed server pipeline. Changing the order of query parameters does not change the processing order. Do not rely on parameter order to control cropping or resizing.
https://api.getpronto.io/v1/file/user-123/image.jpg?w=800&format=auto&q=autoKeep the original extension when using format=auto. Automatic quality chooses a format-specific starting quality and adjusts it for simple graphics or transparency. It does not target a file size. Both automatic options are opt-in.
For responsive sizing, provide several width URLs in srcsetand describe your layout with sizes. The browser chooses a candidate. Use the SDK's imageProps helper or copy responsive HTML from the dashboard's transform builder. Adjust the copied sizes and alt text for your page. Each requested width can create a separate transformation; generating URLs alone does not process images.
See image defaults and fallback behaviour for SVG/BMP delivery, animation, transparency and quota handling.
Continue exploring our documentation with these related topics: