Images Supplied by the Product Advertising API
http://images.amazon.com/images/P/B000BNM5OA.01_SL110_.jpg
All image URLs have a common structure.
URL Portion | Description |
---|---|
Endpoint | URL of the image server. For all images it's http://images.amazon.com/images/P/. |
Alphanumeric token |
An ID that uniquely identifies an image, for example, B000BNM5OA.01.SWCH. The 01 is a country code. Country codes are important because the language in the figures varies by locale. The following list shows the country code values.
|
Suffix |
Specifies the size of the image returned. Possible suffix values are:
|
Note | |
---|---|
The small and thumbnail sizes are the same. |
Looking at the suffixes, you can see that the numerical values refer to the maximum number of pixels on the longest side of the image. Generally, Amazon images will be exactly the number of pixels specified in the filename, that is, a _SL500_.jpg image will be 500 pixels long on its longest side. Images that do not come from Amazon will not necessarily be 500 pixels exactly. The image returned will be the largest available image that is equal to or less than the image size specified in the image's filename. For example, an _SL500_.jpg image might only be 400 pixels on its longest side.
There are 96 pixels per inch.
The following figure shows the relative sizes of Large, Medium, and Small images.
Notice that all of the images are the same, just in different sizes. This corresponds to the image ID being the same for all of the preceding images, just the suffixes, which indicate size, are different. Each image is about half the size of the next larger size.
Hard coding image URLs into applications is not recommended because images come and go. Using the Images or VariationImages response groups to return images guarantees up-to-date image URLs. Once you retrieve the image URLs, you can manipulate just the suffixes of the image name to display the different sizes of the image. This technique saves you from having to send separate requests for each image size.
Related Topics