Hi,
Try this code.
{% assign fixed_height_mobile = true %}
{% assign fixed_height_desktop = true %}
{% if section.settings.mobile_height == 'natural' %}
{% assign fixed_height_mobile = false %}
{% endif %}
{% if section.settings.desktop_height == 'natural' %}
{% assign fixed_height_desktop = false %}
{% endif %}
{%- assign image = section.settings.image -%}
{%- assign heading = section.settings.title | escape -%}
{%- assign content = section.settings.content -%}
{%- assign alignment = section.settings.alignment -%}
{% if heading or image %}
{%- capture image_tag -%}
{%- if section.settings.image != blank -%}
{%
render 'rimg'
img: image,
alt: heading,
size: '1024x1024',
lazy: true
%}
{%- else -%}
{{ 'collection-1' | placeholder_svg_tag: 'placeholder-svg' }}
{%- endif -%}
{%- endcapture -%}
{% assign placeholder_style = 'collection-2' %}
{% assign color = settings.accent-colour %}
{% assign color_string = 'fill="' | append: color | append: '" xmlns' %}
{% capture demo_image %}{%- render 'placeholder_svg_uri', placeholder: placeholder_style, color_string: color_string -%}{% endcapture %}
{% else %}
{% endif %}
{% schema %}
{
"name": "Image with text",
"class": "shopify-section--image-with-text",
"settings": [
{
"type": "select",
"id": "margin",
"label": "Show spacing",
"options": [
{
"value": "regular",
"label": "Regular"
},
{
"value": "none",
"label": "None"
}
],
"default": "regular"
},
{
"type": "header",
"content": "Image"
},
{
"type": "image_picker",
"id": "image",
"label": "Image"
},
{
"type": "select",
"id": "alignment",
"label": "Image position",
"options": [
{
"value": "left",
"label": "Left"
},
{
"value": "right",
"label": "Right"
}
]
},
{
"type": "select",
"id": "desktop_height",
"label": "Desktop height",
"options": [
{
"value": "natural",
"label": "Natural"
},
{
"value": "small",
"label": "500px"
},
{
"value": "medium",
"label": "600px"
},
{
"value": "large",
"label": "700px"
},
{
"value": "extra-large",
"label": "800px"
}
],
"default": "natural"
},
{
"type": "select",
"id": "mobile_height",
"label": "Mobile height",
"options": [
{
"value": "natural",
"label": "Natural"
},
{
"value": "small",
"label": "300px"
},
{
"value": "medium",
"label": "400px"
},
{
"value": "large",
"label": "500px"
}
],
"default": "natural"
},
{
"type": "checkbox",
"id": "parallax",
"label": "Enable parallax",
"default": false
},
{
"type": "header",
"content": "Text"
},
{
"type": "text",
"id": "title",
"label": "Heading",
"default": "Image with text"
},
{
"type": "richtext",
"id": "content",
"label": "Text",
"default": "
Say a bit about your brand, a specific product, or promotion.
"
},
{
"type": "text",
"id": "btn_title",
"label": "Button Title",
"default": "Shop Now"
},
{
"type": "url",
"id": "link",
"label": "Link"
}
],
"presets": [
{
"category": "Image",
"name": "Image with text"
}
]
}
{% endschema %}
Thanks
Hit Like and Accept as Solution.