API reference
Base URL
All requests should be made to the following base URL:
https://resizer.usebaked.com/api?
Basic options
Parameter | Type | Description | Default Value |
---|---|---|---|
url | string | Required. The URL of the image to process. if a path is provided, the resizer will append the path to the referring domain. if you pass /example.jpg , the output will be refer_domain+/example.jpg . or pass absolute urls. | |
w | number | Specifies the output width of the image in pixels. | Original image width |
h | number | Specifies the output height of the image in pixels. | Original image height |
q | number | Output quality of the image. | 80 |
Format options
Parameter | Type | Description | Default Value |
---|---|---|---|
blur | number | Applies a blur effect. Value specifies the intensity. | |
mask | string | Applies a mask to the image, possible values: circle | |
contain_bg | string | Sets the background color when using fit=contain . | |
mask_bg | string | Sets the background color when using a mask. | |
fit | string | Defines how the image should fit within the given dimensions. Supported values: cover , contain , fill , inside , outside . | cover |
Advanced options
Parameter | Type | Description | Default Value |
---|---|---|---|
format | string | Specifies the output image format. Supported values: webp , jpeg , png , gif , avif , svg , heic . | webp |
progressive | boolean | If true , generates a progressive (interlaced) image for faster loading. | false |
maxage | string | Sets the Cache-Control header to specify the maximum age for caching. | 30d |
filename | string | Sets the file name in the Content-Disposition header. Must be alphanumeric. | image |
dpr | number | Specifies the device pixel ratio for high-resolution displays. | 1 |
animated | boolean | Enables animated output for GIF or WebP formats. | false |
base64 | boolean | If true , returns the image as a Base64-encoded string. | false |
Example Request
Resize an image to 500x500 pixels, convert it to WebP format, and set the quality to 90:
https://resizer.usebaked.com?url=https://example.com/image.jpg&width=500&height=500&format=webp&quality=90