[asa2_img]

This shortcode lets you display a single product image selected from all available ones.

Basic usage

[asa2_img img="3"]ASIN[/asa2]

Options

img

The number of the image you want to display.

[asa2_img img="4"]ASIN[/asa2]

width

Custom image width (optional). If not set, the default image width gets used.

[asa2_img img="4" width="350"]ASIN[/asa2]

height

Custom image height (optional). If not set, the default image height gets used.

[asa2_img img="4" height="180"]ASIN[/asa2]

size

The image size / resolution.

Supported values are the image sizes returned by the API which can be found in ASA 2‘s placeholder {{ ImageSetsArray }}. If no size is specified, MediumImage is used.

[asa2_img img="4" size="LargeImage"]ASIN[/asa2]

Usually those sizes are:

  • SwatchImage
  • SmallImage
  • ThumbnailImage
  • TinyImage
  • MediumImage (Default)
  • LargeImage
  • HiResImage
images sizes

tpl

The template to use for displaying the image (optional). If none is set, the default image template will get used. This can be configured in the options, see Default image template.

[asa2_img img="4" img_tpl="my_image_layout"]ASIN[/asa2]

tplid

If you want to define a template by its ID, use the tplid option. You can find the ID in the first column of the template table. Using the template ID allows you to change the template’s name afterwards.

[asa2_img img="4" tplid="32"]ASIN[/asa2]

show_title

If the product title should be shown (optional).

Valid values to activate the title are: 1, true, yes, y

[asa2_img img="4" show_title="1"]ASIN[/asa2]

show_button

If the buy button should be shown (optional).

Valid values to activate the button are: 1, true, yes, y

[asa2_img img="4" show_button="1"]ASIN[/asa2]

country_code

With the option country_code you can define the Amazon country store you want to embed the product from.

Note

You can use different stores on the same page.

Supported country codes are: BR, CA, CN, DE, ES, FR, IN, IT, JP, MX, UK, US.

[asa2_img country_code="DE"]B00BIYAO3K[/asa2]
[asa2_img country_code="ES"]B00BIYAO3K[/asa2]

align

The alignment setting for the image box (optional). Possible values are: left, right, center, none

Examples:

[asa2_img img="4" align="left"]ASIN[/asa2]

no_cache

The no_cache option will prevent the product from being loaded from cache. This is useful if you want to test template updates in the frontend. In production you should not use it.

[asa2_img img="4" no_cache="1"]B0094J2BZ0[/asa2]

tracking_id

Custom Associate ID

[asa2_img img="4" tracking_id="other-id"]B0094J2BZ0[/asa2]

Custom Values

Additionally to the shortcode options, you can also define custom values to use as placeholders in templates.

It is very easy. Just define a unique shortcode option with a value and use the exact same option name as placeholder in a template.

[asa2_img img="4" my_custom_text="Banana!"]B0094J2BZ0[/asa2]

# use placeholder {{ my_custom_text }} in your template