Skip to main content

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.

TransformationExamplesDescription
format=typeformat=pngrequest a png image
format=type&resize=width,heightformat=png&resize=100,100request resized png image

The transformation parameters are described below:-

ParameterDescription
typewebp, 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

URLResult
https://cdn.filespin.io/api/v1/assets/{ASSET_ID}/conversions?format=webpa WebP image
https://cdn.filespin.io/api/v1/assets/{ASSET_ID}/conversions?format=png&resize=100,100a PNG image resized to fit 100x100
https://cdn.filespin.io/api/v1/assets/{ASSET_ID}/conversions?format=jpg&quality=75a JPG at quality 75