Skip to content

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

ParameterDescription
widthTarget width in px (max 5760)
heightTarget height in px
crop’top’, ‘center’, ‘bottom’, ‘left’, ‘right’ or ‘region’
format’jpg’ or ‘pjpg’
quality1–100
pad_colorHex color used when fit pads
scalePixel-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/…