Resize Image
Creates a new image by resizing an existing image
Guide
Learn how to resize an image
Description
This endpoint creates a new image by resizing an existing image.
At the moment, there are three fit modes available:
Available fit modes
fill
: The image is resized to fill the specified dimensions, stretching/squishing the image to fit the provided dimensions. This is the default fit mode.contain
: The image is resized to fit within the specified dimensions, maintaining the aspect ratio, and adding a letterbox if necessary.cover
: The image is resized to cover the specified dimensions, maintaining the aspect ratio, cropping/clipping the image if necessary.
Additionally, you can specify the background color for the letterbox when using the contain
fit mode, and
the gravity for cropping or positioning the image when using the cover
and contain
fit modes.
The next image shows the available gravity modes with a white letterbox_color
and a contain
fit mode:
Available gravity modes with a white letterbox_color and a contain fit mode
Authorizations
API Key for authentication
Path Parameters
The unique identifier of the image. This identifier is used to reference the image in subsequent requests.
Body
Response
The API will return the Image object in the response body.
The Image object represents an image processed using the IMG Processing API. The object contains information about the image, such as its URL, size, and format. The Image object is returned in the response body of all image processing requests.