Format
Specify the format of the returned image. If not specified, format is implicitly set to avif or webp for supported browsers with JPG as fallback format.
info
format can be combined with all other options.
| Transformation | Examples | Description |
|---|---|---|
format=type | format=png | request a png image |
format=type&resize=width,height | format=png&resize=100,100 | request resized png image |
The transformation parameters are described below:-
| Parameter | Description |
|---|---|
type | webp, avif, png, jpg or gif |
Examples
Format parameters go on the asset's on-demand image URL, like every other transformation, and combine with other options using &:
https://cdn.filespin.io/api/v1/assets/{ASSET_ID}/conversions?format=webp
| URL | Result |
|---|---|
https://cdn.filespin.io/api/v1/assets/{ASSET_ID}/conversions?format=webp | a WebP image |
https://cdn.filespin.io/api/v1/assets/{ASSET_ID}/conversions?format=png&resize=100,100 | a PNG image resized to fit 100x100 |
https://cdn.filespin.io/api/v1/assets/{ASSET_ID}/conversions?format=jpg&quality=75 | a JPG at quality 75 |