Dynamic Images
Every image object includes a url
property, which returns a direct URL to the image. You can customize the size and format of each image by adding specific query parameters to this URL. Below are the supported parameters and examples of their usage.
Resizing
You can resize an image by specifying one or both of the following parameters:
w
: (width): Sets the output width (in pixels).h
: (height): Sets the output height (in pixels).
When you provide both w
and h
, the image is fit within those dimensions while preserving its aspect ratio.
By default, the URL for each image may already include query parameters for width (w
) and height (h
). These default values ensure a certain size is always delivered unless you override them. You can modify or remove these parameters to fetch different sizes or the original image.
Format Conversion
You can also convert an image from its original format to a different format by adding the fm parameter. Supported values include jpg
, png
, and avif
.