I am creating a new page.liquid but with the code that I provided below I can not see the images. In html dom I can see srcset=“image” but in the frontend I can not see tag thats why I can not see the images. What am I missing?
<div class="materialGuide">
<div class="heroWrapper">
<div class="heroText">
<h1>{{ section.settings.materialHeading }}</h1>
<p>{{ section.settings.materialDesc }}</p>
</div>
<img class="heroImage" srcset="{{ section.settings.materialHero | img_url: 'master' }}">
</div>
<h2>{{ section.settings.materialBottomHeading }}</h2>
{%- for block in section.blocks -%}
<div class="materialComp1">
<picture>
{%- if block.settings.comp1 != blank -%}
<source
media="(max-width: 699px)"
srcset="{{ block.settings.comp1 | image_url: width: '400x' }} 400w, {{ block.settings.comp1 | image_url: width: '600x' }} 600w, {{ block.settings.comp1 | image_url: width: '800x' }} 800w, {{ block.settings.comp1 | image_url: width: '1000x' }} 1000w"
width="{{ block.settings.comp1.width }}"
height="{{ block.settings.comp1.height }}">
{%- endif -%}
{%- if block.settings.image != blank -%}
{{- block.settings.image | image_url: width: block.settings.image.width | image_tag: loading: 'lazy', sizes: sizes, widths: '200,300,400,500,600,700,800,900,1000,1200,1400,1600,1800,2000,2200,2400,2600,2800,3000,3200', reveal-on-scroll: block.settings.reveal_on_scroll -}}
{%- endif -%}
</picture>
<div class="comp1Right">
<h3>{{ block.settings.comp1Heading }}</h3>
<p>{{ block.settings.comp1Desc }}</p>
</div>
</div>
{%- endfor -%}
</div>
{% schema %}
{
"name": "Material Guide",
"settings": [
{
"type": "text",
"id": "materialHeading",
"label": "Material Heading",
"default": "Materialien"
}, {
"type": "text",
"id": "materialDesc",
"label": "Material Description",
"default": "Dies ist dein Guide für die vielseitigen Fasern und Materialien, welche wir in unseren Jeans und Non-Denim Produkten verarbeiten."
}, {
"type": "image_picker",
"id": "materialHero",
"label": "Material Hero"
}, {
"type": "text",
"id": "materialBottomHeading",
"label": "Material Component Heading",
"default": "Stoffe/Materialien"
}
],
"blocks": [
{
"type": "block",
"name": "Material Guide Blocks",
"settings": [
{
"type": "image_picker",
"id": "comp1",
"label": "Image 1"
}, {
"type": "text",
"id": "comp1Heading",
"label": "Component 1 Heading",
"default": "Heading"
}, {
"type": "text",
"id": "comp1Desc",
"label": "Component 1 Description",
"default": "Description"
}
]
}
],
"presets": [
{
"name": "Material Guide"
}
]
}
{% endschema %}
<style>
section#shopify-section-template--18001063641353__main .section-spacing.section-spacing--tight {
display: none;
}
.heroWrapper {
position: relative;
}
.heroText {
position: absolute;
left: 0;
right: 0;
bottom: 50%;
text-align: center;
color: white;
}
.heroText h1 {
margin-bottom: 15px;
}
.heroText p {
width: 50%;
margin: 0 auto;
font-family: var(--heading-font-family);
}
.materialGuide h2 {
position: relative;
margin: 5% 0 3%;
text-align: center;
color: #000;
}
.materialGuide h2:after {
content: "";
display: block;
width: 70px;
height: 2px;
background: #D4CDB5;
position: absolute;
bottom: -10px;
left: 0;
right: 0;
margin: 0 auto;
}
.materialComp1 {
display: flex;
align-items: center;
width: 90%;
margin: 3% auto;
}
.materialComp1 img {
width: 50%;
height: auto;
}
.comp1Right {
width: 50%;
margin: 0 7%;
}
.comp1Right h3 {
font-size: 20px;
color: #000;
font-weight: 100;
margin-bottom: 10px;
}
.comp1Right p {
color: #000;
font-size: 12px;
font-family: var(--heading-font-family);
width: 80%;
}
</style>
