image_url
Returns a CDN URL for an image, resized and optimized on the fly. Requires width or height.
Syntax
{{ image | image_url: width: 400 }}Parameters
| Parameter | Description |
|---|---|
width | Target width in px (max 5760) |
height | Target height in px |
crop | ’top’, ‘center’, ‘bottom’, ‘left’, ‘right’ or ‘region’ |
format | ’jpg’ or ‘pjpg’ |
quality | 1–100 |
pad_color | Hex color used when fit pads |
scale | Pixel-density multiplier (2, 3) |
Example
{{ product.featured_image | image_url: width: 400, height: 400, crop: 'center' }}Output:
https://img.sellerlane.io/…/rs:fill:400:400/…