Skip to main content
Skip table of contents

Getting a specific user profile icon

Request

To get a specific user profile icon image (for example, to display for a particular user profile), send a GET request to:

CODE
https://<host>:<port>/images/v1/image/imageid/{imageId}

Headers

  • Content-Type: image/jpeg

Mandatory arguments

  • imageId – the ID of the image to be retrieved

Optional arguments

All the following arguments are in the query string:

  • Image dimensions (Note that if you specify dimensions, you must specify two of the following. If you specify all three, height will be ignored.):

    • width – the width of the image in pixels

    • height – the height of the image in pixels

    • aspect – the aspect ratio of the image (e.g., 16x9)

  • imageFormat – the image format. If this is specified, it must have a value of webp. If it is omitted, a JPEG image is returned.

  • dominantDimension – the dimension (width or height) that takes precedence when calculating dimensions or aspect ratio.
    Note: If a value is specified for aspect, this is ignored – width will always take precedence.

Response

A successful request returns an HTTP 200 status.

A bad request returns an HTTP 400 status.

If the specified imageId does not exist, it returns an HTTP 404 status.

Example

A successful request returns a payload that looks like this:

JSON
{
    "count": 1,
    "results": [
        {
             "uri": "image-service/discrete/OpfProfile/smileyface/default-locale/OpfProfile_1x1_master"
        }
    ]
}

See also

ImageService API documentation

JavaScript errors detected

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

If this problem persists, please contact our support.