Program images
Most programs have an image that can be used as a preview image for actual content. This can be used in program listings and as teaser image before the video starts playing.
If the program has an image, its information can be found at top level in
program details object, inside image
field. It looks like this:
"image": {
"id":"13-1-2185369",
"available":true,
"type":"ImageObject"
}
To actually retrieve the image, you can derive the CDN URL from Image ID:
http://images.cdn.yle.fi/image/upload/{transformations}/{id}.{format}
This request can be done without authentication keys.
If you just want the image as it is, you can leave transformations
out. Format can be either jpg
, png
or gif
.
For example, using the image information above, we could request
http://images.cdn.yle.fi/image/upload/13-1-2185369.jpg:
You can also request the image in different sizes through transformations. For example, to request 120x120 thumbnail
keeping aspect ratio as it is, you could supply w_120,h_120,c_fit
transformation.
http://images.cdn.yle.fi/image/upload/w_120,h_120,c_fit/13-1-2185369.jpg
More documentation on available transformations can be found from Cloudinary’s documentation.