GET /{space_id}/{asset_id}/{image_name}

contentful.com:contentful-images

Summary: Retrieve and transform an image
Operation ID: getTransformedImage
Auth: unknown
Description

Fetches an image from Contentful's CDN with optional transformation parameters. The image is identified by the space ID, asset ID, and optional filename.

Parameters (12)

asset_id (string, path, required)

Unique asset identifier for the image

bg (string, query, optional)

Background color for padding (fit=pad). RGB hex format: rgb:9090ff

Constraints: {'pattern': '^rgb:[0-9a-fA-F]{6}$'}

f (string, query, optional, default: center)

Focus area for cropping (fit=crop, fit=thumb, or fit=fill). Default is 'center'.

Constraints: {'enum': ['center', 'top', 'right', 'left', 'bottom', 'top_right', 'top_left', 'bottom_right', 'bottom_left', 'face', 'faces']}

fit (string, query, optional, default: pad)

Resize behavior when both width and height are specified. Default is 'pad'.

Constraints: {'enum': ['pad', 'fill', 'scale', 'crop', 'thumb']}

fl (array, query, optional)

Image flags. Comma-separated list of flags to apply.

fm (string, query, optional)

Output image format. Converts the image to the specified format.

Constraints: {'enum': ['jpg', 'png', 'webp', 'gif', 'avif', 'tiff']}

h (integer, query, optional)

Image height in pixels (1-4000). Resizes the image to the specified height.

Constraints: {'minimum': 1, 'maximum': 4000}

image_name (string, path, optional)

Optional filename for the image (used for SEO and browser download naming)

q (integer, query, optional, default: 100)

JPEG/AVIF quality as percentage (1-100). Default is 100 (lossless). Lower values produce smaller files.

Constraints: {'minimum': 1, 'maximum': 100}

r (?, query, optional)

Corner radius in pixels or 'max' for circular crop. Applies rounded corners to the image.

space_id (string, path, required)

Contentful space identifier

w (integer, query, optional)

Image width in pixels (1-4000). Resizes the image to the specified width.

Constraints: {'minimum': 1, 'maximum': 4000}

No probe data for this endpoint yet.