StreamCo Images API

The images API allows retrieval of catalogue images on StreamCo and resizing using the ?resize parameter.

Arbitrary image retrieval is not supported.

Errors

The images API will return a HTTP 404 if the requested image didn't exist, and a HTTP 500 if the image couldn't be decoded or encoded for any reason. The actual response data isn't guaranteed to be well-formed and is only for developer debugging. The API may also return a 502 if the image fetch timed out.

Requesting an image

An image can be requested by specifying the image name in the URL, e.g. /tt2395695_landscape.jpg.

Resizing

An example of resizing is /tt2395695_landscape.jpg?resize=320px:240px. If the height of the image is left out (e.g. /tt2395695_landscape.jpg?resize=320px:), it will be inferred from the aspect ratio.

The maximum size an image can be resized up to is the 4K resolution (3840px × 2160px). If you request an image that wouldn't fit on a 4K screen, the API will return a 400.

Adjusting quality

If and only if an image is being resized, you can also pass in the quality parameter to change the quality of the output JPEG image. The default value is 90. If you want to save memory, use 75.