Images

The following placeholders are all related to the item’s images.

{{ SmallImageWidth }}

The width of the small image in pixel, e.g. “75”.

{{ SmallImageHeight }}

The height of the small image in pixel, e.g. “75”.

{{ SmallImageURL }}

The URL of the small image.

<img src="{{ SmallImageURL }}" width="{{ SmallImageWidth }}" height="{{ SmallImageHeight }}">

{{ MediumImageWidth }}

The width of the medium image in pixel, e.g. “160”.

{{ MediumImageHeight }}

The height of the medium image in pixel, e.g. “120”.

{{ MediumImageURL }}

The URL of the medium image.

<img src="{{ MediumImageURL }}" width="{{ MediumImageWidth }}" height="{{ MediumImageHeight }}">

{{ MissingImageUrl }}

Contains the URL to an image that symbolizes a missing product image.

Missing product image

{{ MissingImageWidth }}

The width of the missing product image in pixel.

{{ MissingImageHeight }}

The height of the missing product image in pixel.

{{ LargeImageWidth }}

The width of the large image in pixel, e.g. “500”.

{{ LargeImageHeight }}

The height of the large image in pixel, e.g. “380”.

{{ LargeImageURL }}

The URL of the large image.

<img src="{{ LargeImageURL }}" width="{{ LargeImageWidth }}" height="{{ LargeImageHeight }}">

{{ ImageSetsArray }}

An array containing all information about the product images delivered by Amazon API. It can be used best by looping through the contents like this lightbox gallery example shows:

{% if ImageSetsArray is not empty %}
    <h4>Gallery</h4>
    <div class="asa2_gallery">
    {% for imgSet in ImageSetsArray %}
        <a href="{{ imgSet.LargeImage.URL }}" rel="lightbox[{{ ASIN }}]"><img src="{{ imgSet.MediumImage.URL }}" /></a>
    {% endfor %}
    </div>
{% endif %}

{{ ImageSetsTotal }}

The total amount of image sets (integer).

{{ ImageSetsArray|get }}

With filter get on placeholder ImageSetsArray you can access single images of a product.

Usage in templates

This example will build an img tag with the second image of the image set in medium size:

<img src="{{ ImageSetsArray|get(2, 'medium', 'url') }}">

This example will generate an img tag with image number 9 and large size:

{{ ImageSetsArray|get(9, 'large') }}

Usage in shortcodes

This example will generate an img tag with image number 12 in large size:

[asa2 value="ImageSetsArray|get(12, 'large')"]B00SDTTH5E[/asa2]

Options

Parameter Description Default
$number

The number of the image.

If there is no image with this number, the result will be empty.

1
$size

The size of the image.

If there is no image with this size, the result will be empty.

large
$type

The result type.

“tag” will return an img tag ready to use.

“url” will return image URL.

tag
Possible images sizes
swatch
small
thumbnail
tiny
medium
large
hires