Skip to main content
Skip table of contents

Use ImageService to get images

Request

To retrieve an image from ImageService, send a GET request to:

CODE
http://<imageservice.operator.com>/images/v1/image/{contentType}/{id}/{imageType}

Headers

  • Content-Type: image/jpeg

Mandatory arguments

  • contentType – one of the content types as present in the ingested data. (Supported values will vary depending on the operator, and can include values such as Movie, TV, Channel, Series, and Sports.)
  • id – the ID of the content that the image represents
  • imageTypeone of the image types as configured in the service, for example, Poster, LogoBanner, etc.
  • One of the following combinations:
    • width and height
    • width and aspect
    • height and aspect

    If you provide width, height, and aspect, only width and aspect are used. height is ignored.

Other arguments

  • imageFormat – the required image format. Available values: webp. Default (if not specified): JPEG.

    If an image is letterboxed (that is, ImageService adds padding to convert the image to match the requested aspect ratio), the padding will be:

    • Transparent if the image is WebP.
    • Black if the image is JPEG.

    If you need transparent padding, request WebP images.

  • dominantDimension – the dimension that should take precedence when calculating dimensions/aspect ratio. Available values: width, height.

    If you specify an aspect ratio, dominantDimension is ignored and width is used as the dominant dimension.

  • locale – the required locale

Example 

A GET request like this:

CODE
https://<host>:<port>/images/v1/image/Series/DPlus_6ed3fb3a-9c30-48fc-99ba-2e4f6b5990d6/BannerMain?width=300&aspect=16x9

... returns an image of type BannerMain for the specified content, which is of type Series. The image that is returned has a width of 300 and an aspect ratio of 16:9. (If a non-standard aspect ratio was specified, ImageService would return an image of the closest standard aspect ratio.)

Responses

A successful request returns an HTTP 200 status.

If the ImageService had to use letterboxing to convert an image with a different aspect ratio to the one requested, the aspectMatch field in the response will have a value of false.

A bad request returns an HTTP 400 status.

An unsuccessful request returns an HTTP 500 status.

Body

See also

For full details of this API, see the ImageService API documentation.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.