item_image — Get a customized item image tag.

Item-related functions


item_image($imageType = null, $props = array(), $index = 0, $item = null)

Get a customized item image tag.

  • $imageType (string) – Image size: thumbnail, square thumbnail, fullsize
  • $props (array) – HTML attributes for the img tag
  • $index (int) – Which file within the item to use, by order. Default is the first file.
  • $item



Use to display an image file associated with an item. Use the parameters to control the image size and combine with link_to_item to wrap the image tag in an anchor tag.

<?php echo link_to_item(item_image('square_thumbnail', array('alt' => $itemTitle))); ?>

See Also