Image is not working

Short description of issue

So I am having trouble in uploading the image. When I upload the image it doesnot show up for somereason what is the problem. All the are down below.

Link to Shopify Store

Reproduction steps

Are you Hypothyroid?

{% for i in (1..4) %} {% assign image_key = 'hero_image_' | append: i %} {% assign image = block.settings[image_key] %}
{% if image %} {{ image.alt | escape }} {% else %}
{{ 'image' | placeholder_svg_tag }}
Add image {{ i }}

Additional info

{% schema %}
{
“name”: “Thyroid homepage content”,
“settings”: [
{
“type”: “header”,
“content”: “Hero images”
},
{
“type”: “image_picker”,
“id”: “hero_image_1”,
“label”: “Hero image 1”
},
{
“type”: “image_picker”,
“id”: “hero_image_2”,
“label”: “Hero image 2”
},
{
“type”: “image_picker”,
“id”: “hero_image_3”,
“label”: “Hero image 3”
},
{
“type”: “image_picker”,
“id”: “hero_image_4”,
“label”: “Hero image 4”
},
{
“type”: “image_picker”,
“id”: “happy_family_image”,
“label”: “Happy family image”
},

What type of topic is this

Troubleshooting

Upload screenshot(s) of issue


Hello @Hitendra_Shah,

Probably has to do with the {% if image %} which can lead to exotic results when used for non-boolean variables.

I would try {% if image != null %} as a start.