Retrieve Media - Top Image
GET MEDIA TOP IMAGE
The /media
top image resource returns a 302 redirect to an image resource. Callers must follow the redirect to get the actual image bytes. The resource returned is the top image according to the sorting rule (default is Optimized). If using HTML or CSS, the redirect will be followed and the image displayed automatically. This API is most useful in environments where JavaScript or other code is not available, like Email.
https://edge.curalate.com/v1/media/:dataSourceId/images/top
Parameters
All parameters are optional.
Name | Type | Description | Example |
---|---|---|---|
filter | string | Filters the requested content. See options in the Media Filter section below. | filter=productId:leather-jacket |
offset | number | Gets the top image at the Nth offset. This enables displaying multiple images by simply varying the offset parameter. Valid values: 0 … 24 | 1 |
fallbackImage | string | URL to an image to use as the result if no matching content is available. | https://img.curalate.com/1.jpg |
width | number | Pixel width. Set to resize the image to the desired width. | 400 |
height | number | Pixel height. Use with the width parameter to control both dimensions, e.g., to create a square image. If the resulting aspect ratio differs from the original image, it will be cropped using an intelligent algorithm that preserves features in the image. | 400 |
Updated 11 months ago