在自定义部分使用shopify Image_picker未显示图像
我在shopify主题中创建了一个自定义部分。在在自定义部分使用shopify Image_picker未显示图像,shopify,sections,imagepicker,Shopify,Sections,Imagepicker,我在shopify主题中创建了一个自定义部分。在{%schema%}标记中,这是我的代码: {% schema %} { "name": "about", "settings": [ { "type": "text", "label": "Heading", "id": "heading"
{%schema%}
标记中,这是我的代码:
{% schema %}
{
"name": "about",
"settings": [
{
"type": "text",
"label": "Heading",
"id": "heading"
},
{
"type": "richtext",
"label": "description",
"id": "description"
}
],
"blocks" : [
{
"type": "image",
"name" : "image block",
"settings" : [
{
"type": "image_picker",
"label": "your image",
"id" : "image"
}
]
}
],
"presets": [{
"name": "about",
"category": "image",
}]
}
}
{% endschema %}
Text和richtext以及上载图像的选项都可以正常工作,但是图像不会在页面上呈现。它只显示典型的未找到图像图标
以下是我试图显示图像的方式:
{% for block in section.blocks %}
<img src="{{ block.settings.image | image_url:'master'}}"/>
{%endfor%}
{%for section.blocks%}
{%endfor%}
我甚至尝试上传“免费图片” 将
| image_url
过滤器更改为|img_url