Images
Topics
An image is said to be worth a thousand words. In e-commerce, this is almost always true. The downside of e-commerce is that customers cannot try on clothes or handle items they might like to buy. Providing customers with great images helps overcome that hurdle.
Multiple Images Versus Variation Images
Amazon images are associated in the following ways:
-
Size
-
View
-
Variation
Product Advertising API makes every image available in three or four different sizes. One item is presented in multiple views and each of the views is presented in three or four different sizes. The following images show the same item in two different views. Both images are medium sized.
One item has one or more variations. The images returned show the same item in its multiple variations and each variation is presented in three or four different sizes. The following images show two variations of the same item.
Amazon groups items as variations of one another when the items are identical except for one or two properties. In the preceding figure, the same shirt is shown in two different colors. Each variation shown is called a child item. The parent item is what associates all of the child items and their images, as shown in the following figure.
In this example, the parent item comes in three different colors. Each color is a separate variation, and each variation has its own item identifier, such as a ASIN. Typically, the parent item does not have an image associated with it because it is an abstraction of all of its child items. If a parent ASIN is included in a request, Product Advertising API typically tries to return the image of a child ASIN.
In the XML responses, the image URLs are grouped according to these associations within the ImageSet element.
Image Sets
An image set groups together related images. Those images can be related by size, item, or variation. The following image set shows images grouped according to size.
<ImageSets> <ImageSet Category="primary"> <SmallImage> ... </SmallImage> <MediumImage> ... </MediumImage> <LargeImage> ... </LargeImage> </ImageSet> </ImageSets>
If the images were variations of the primary image, the image set would include a fourth image, the swatch size image.
<SwatchImage> ... </SwatchImage>
If multiple views of the same item were returned, you would have multiple
ImageSet
elements within an ImageSets
element, where each ImageSet
represented a different view, as follows.
<ImageSets> <ImageSet> ... </ImageSet> <ImageSet> ... </ImageSet> <ImageSets>
In an ImageSet
, then, you have one view of an image
presented in three or four sizes. So, if Amazon has five different images of an
item, Product Advertising API would return three or four sizes of each image, totaling fifteen or
twenty image URLs.
Typically, XML responses include multiple ImageSets, which are returned within the
ImageSets
element.
ImageSet Categories
Product Advertising API takes the guess work out of such situations by adding an attribute
to the ImageSet
element called Category. The following
XML response snippet shows an example of a "primary" Category
ImageSet.
<ImageSets> <ImageSet Category="primary">
The following table shows Category
values and their
potential uses.
Category Value | Description |
---|---|
primary | Use the images in this image set for the first image a customer sees of an item. |
variant | Use images in this image set to display other views of the same item or to present variations of the primary item. |
swatch | Use images in this image set to get four sizes of the swatch image. |
The following image shows an example of an image from the primary ImageSet
.
The following image shows the variant image associated with the primary from
the variant ImageSet
.
This image is the back cover of the same book. Displaying multiple views of the same item helps give customers a better sense of what they are buying. For that reason, providing customers with the opportunity to display "variant" image sets in addition to the "primary" image set helps drive sales.
Retrieving Images
Images are returned by two response groups:
-
Images
-
VariationImages
These response groups are also included in the Medium and Large response groups.
The Images response group can be used with the following Product Advertising API operations:
-
ItemLookup
-
ItemSearch
-
ListLookup
-
SimilarityLookup
The Images
response group does not return images of
child items; it only returns an image of the parent item, if there is one. To
return the images of the child items, use the VariationImages
response group, which can only be used with the
ItemLookup
operation.
Conversely, VariationImages
only returns images of
child items. If you use this response group with items that are not child items,
ItemLookup
does not return any images.
Some items do not have images or have images that are missing, for example, the large size of an image might be missing. If an item does not have an associated image, either the image is missing or the item is a parent item. Often parent items do not have associated images because they are abstractions of all of the child items. Product Advertising API sometimes returns the image of a child item for a parent item so that something can be displayed.
If the item in the request, such as a parent item, does not have images
associated with it, the ImageSet
and ImageSets
elements are not included in the response.