The sizes
array determines the resolution of one or more images to be created in the request.
Specify an object consisting of width
and height
properties, and optionally a filename
property if you wish to specify the resulting image's filename for the resolution.
Not specifying a filename
will result in a random identifier being used.
{
"template": "sample-image",
"sizes": [
{
"width": 1080,
"height": 1080,
"filename": "my-image.png"
}
]
}
You can also include modifiers in the filename
specifier to aid in filename generation:
Modifier | Result |
---|---|
%w | will be replaced with the width |
%h | will be replaced with the height |
%d | will be replaced with the date |
%t | will be replaced with the time |
{
"template": "sample-image",
"sizes": [
{
"width": 1080,
"height": 800,
"filename": "output-%wx%h.png"
}
]
}
# output-1080x800.png
We care about the protection of your data. Read our Privacy Policy.