I have created a custom section and for some reason, when I use image picker section to select uploaded jpg images, it always returns gif images instead and it doesn’t render images in the component.
Do you know why this is happening?
Here is the code I wrote:
<section class="media-history-section">
<div class="container">
{% for block in section.blocks %}
<div class="media-cont">
<div class="media-image-cont">
<img
src="{{ block.settings.image | img_url: 'master' }}"
alt="{{ block.settings.image.alt | default: block.settings.title }}"
/>
</div>
<div class="media-title">{{ block.settings.title }}</div>
</div>
{% endfor %}
</div>
</section>
{% schema %}
{
"name": "Media History",
"tag": "section",
"settings": [],
"blocks": [
{
"type": "media",
"name": "メディア掲載",
"settings": [
{
"type": "image_picker",
"id": "media_image",
"label": "掲載画像"
},
{
"type": "text",
"id": "title",
"label": "タイトル"
}
]
}
],
"presets": [
{
"name": "Media History"
}
]
}
{% endschema %}
JFYI,
{{ block.settings.title }}
renders titles just fine.
