Image URI Transformation
When images are called using product_image_uri, image_uri or content_image_uri, you are offered the opportunity to change how the image is returned. This article provides examples of each value that can be used.
Product Images
Display product images using the product_image_uri method. Read more
Content Images
Display images from your Templates using the content_image_uri method. Read more
Image URL Structure
Aurora's image URLs are designed to be SEO friendly. Read more
Type Parameter
Each of the different types of image transformation available are detailed below. You can follow the example links to view several instances of the Smarty function in use, and its interaction with differing widths and heights.
Type | Description | Example Usage | URL Parameter | Example |
---|---|---|---|---|
resizeandpad | Returns a resized image of the requested dimensions. If the aspect ratio of the requested dimensions differs to the original image, the original image is resized to fill the requested dimensions, whilst maintaining its original aspect ratio - with any additional white space being "padded". | {product_image_uri image_id=105 width=200 height=200 type=resizeandpad} | rp | View Examples |
resizeandcrop | Returns a cropped image of the requested dimensions. Image is resized to fill the requested dimensions and then cropped centrally. The aspect ratio of the original image is maintained | {content_image_uri file=blog/105.jpg width=300 height=150 type=resizeandcrop} | rc | View Examples |
resize | Resizes the image to fit the specified width / height. If the target size and source image sizes have different aspect ratios then shorter side is stretched to fill the space. | {product_image_uri image_id=105 width=200 height=200 type=resize} | r | |
resizetowidth | Returns a resized image matching the width specified. Height is automatically adjusted to maintain the aspect ratio of the original image. | {image_uri image_id=71 origin="User" width=150 height=500 type=resizetoheight} | rw | View Examples |
resizetoheight | Returns a resized image matching the height specified. Width is automatically adjusted to maintain the aspect ratio of the original image. | {content_image_uri file=blog/105.jpg height=150 type=resizetowidth} | rh | View Examples |
resizetomax | Proportionally resizes the image so its longest side is x long, where this "x" is provided as "width". | {content_image_uri file=blog/105.jpg width=150 type=resizetomax} | rm |
For reference, the dimension of the original image used in the above examples is 1024 x 768.
Updated over 2 years ago