Displays the default image for the product.

The default image is the image set as the first image when using a custom image order, or which ever image is automatically sorted to be first when using other image order settings set in the Presentation Settings screen.


  • alt: The alt property of the image
  • bg: The background color to use with the matte fit (#rrggbb, default is #ffffff)
  • class: Specifies the CSS class of the image
  • fit: The fit of unproportional images to the requested size (defaults to all) :
    ** width — Scale the image down to fit the image in the new size by the width, cropping any extra height
    ** height — Scale the image down to fit the image in the new size by the height, cropping any extra width
    ** crop — Scale the image down to fit by the smallest dimension to fill the entire image, cropping the extra off the other dimension (specific cropping adjustments can be made in the product editor)
    ** matte — Scale the image down to fit within the new size filling extra space with a background color
    ** all — Scale the image down to fit within the new size (the final size may differ from the specified dimensions)
  • height: The maximum height of the image in pixels
  • quality: The JPEG image quality (0-100%, default is 80)
  • sharpen: Apply an unsharp mask to the image (100%-500%, default is none)
  • size: The size to use for width and height of the image (used in place of width and height)
  • title: The title property of the image
  • width: The maximum width of the image in pixels
  • zoom: Enables the image zoom effect to view the original size image in a modal image viewer (Colorbox)
  • zoomfx: Enables zoom (also known as lightbox) effects for alternate JavaScript-based modal content viewers.


<?php shopp('product','coverimage'); ?>

Using a Named Image Setting

<?php shopp('product','coverimage','setting=thumbnails'); ?>

Using Specific Settings

<?php shopp('product','coverimage','width=320&height=200&fit=crop&quality=100&class=product-image'); ?>

See Also

  1. useful options that are not listed about:
    return=true: return the value instead of displaying/echoing the value to the page
    property=url: returns just the url of the image, rather than the full image tag output

    February 5th   #

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.