---
title: "getImages"
slug: "api/basket/operations/getimages"
sidebar:
  order: 456
---

<a id="ref-8f084f6c85f9"></a>
<a id="ref-6287d0797acb"></a>
<a id="ref-d3c778c9e8b5"></a>

## Synopsis

```text
ImageInfo[] getImages(SessionId sessionId,
    BItemId itemId,
    GetImagesOptions options)
throws BasketServiceFault;
```

See also: [`ImageInfo`](/pCon/configuratorOnline/specs/api/basket/types/imageinfo#ref-a695dcc0b5f5), [`SessionId`](/pCon/configuratorOnline/specs/api/session/types/sessionid#ref-02e397c8fdb4), [`BItemId`](/pCon/configuratorOnline/specs/api/basket/types/bitemid#ref-bccb6c926e5b), [`GetImagesOptions`](/pCon/configuratorOnline/specs/api/basket/types/getimagesoptions#ref-8476abb2fdbd), [`BasketServiceFault`](/pCon/configuratorOnline/specs/api/basket/faults/basketservicefault#ref-d5adb74faa1b)

The `getImages` operation is used to fetch all images stored for a particular basket item.

The itemId parameter must identify an item in the basket item tree maintained for the session identified by sessionId. The operation may be invoked for any type of basket item. Tagged item images can be assigned by [setImages](/pCon/configuratorOnline/specs/api/basket/operations/setimages); configuration-specific article images are associated with OFML article items.

The operation returns the list of image associated with the specified basket item. Each returned instance of [`ImageInfo`](/pCon/configuratorOnline/specs/api/basket/types/imageinfo) has a distinct tag, multiple instances may reference the same image.

As a special case, article items may return an [`ImageInfo`](/pCon/configuratorOnline/specs/api/basket/types/imageinfo) with an empty tag. If so, the referenced image is said to be the *PBK image*, as this functionality has been implemented for compatibility with pCon.basket and other applications based on pCon.basket technology. See §[Differences Between Online Configurator and pCon.basket](/pCon/configuratorOnline/specs/api/basket/image-generation/differences-between-online-configurator-and-pcon-basket#ref-0348ff9d6f2f) for more information.

The item selection options are used as usual. To preserve backwards compatibility, however, the operation continues to take a single item ID instead of a list of item IDs as argument.

Items of type `Aggregate` may have two default article images, one with sub-articles hidden and one with sub-articles shown (although not necessarily visible). The default article image returned by operation `getImages` depends on the item type and, if a basket view is used, the merge mode of the view:

- The default article image of items of type `PartialPlanning` will always show sub-articles.

- Default article images of items of all other types do not show sub-articles unless the item is a view item and the view uses merge mode `Compact`.

The `getImages` operation never attempts to generate an image. It returns all images generated for a particular item, not only the default article image. However, if the item is an article view item and the view uses merge mode `Articles`, or it is a view item representing a sub-article and the view uses merge mode `SubArticles` or `Compact`, these additional images are not returned.

A [`BasketServiceFault`](/pCon/configuratorOnline/specs/api/basket/faults/basketservicefault) is returned if any of the following conditions occurs:

- The `sessionId` parameter is not a valid string representation of an UUID or does not represent an open session.

- The `itemId` parameter does not represent an UUID.

- The `itemId` parameter does not identify a basket item.

Option [resolveURIs](/pCon/configuratorOnline/specs/api/session/operations/resolveuris) of [GetImagesOptions](/pCon/configuratorOnline/specs/api/basket/types/getimagesoptions) defaults to true. If false, [ImageInfo](/pCon/configuratorOnline/specs/api/basket/types/imageinfo).url returns gen or imp URIs instead of HTTP(S) URLs. Pass such URIs to [setImages](/pCon/configuratorOnline/specs/api/basket/operations/setimages) to reuse existing project image resources for other items without uploading or importing them again.
