image_url
返回图片的 CDN URL。
您可以在以下对象以及它们的 src 属性上使用 image_url helper:
article collection image line_item product variant
注意
无论指定的尺寸如何,图像的大小都不能超过其原始尺寸。
参数
Object{Object}[hash.width]{Number}可选。如果只指定了宽度,则根据图像的尺寸自动计算高度。[hash.height]{Number}可选。如果只指定了高度,则根据图像的尺寸自动计算宽度。[hash.quality]{Number}可选。指定图片压缩后的质量,默认为 80(%)。returns{String}CDN URL
用法
{{ image_url object [width] [height] [quality] }}
例子
{{ image_url product width=450 }}
这篇文章对你有帮助吗?
SHOPLINE