Shopify themes, liquid, logos, and UX
Hi,
I have tried changing my desktop image banner but can’t seem to! It’s a pre built store so it’s keep asking me to change the custom liquid.
I am attaching a picture of what is showing every time I try changing my picture.
Any help or advice will be appreciated 😊
Thanks
VitaVibe
Solved! Go to the solution
This is an accepted solution.
Hi @VitaVibe,
Maybe I suggest you add a new section.
1. Go to Store Online-> theme -> edit code
2. Add a new section image-banner.liquid
3. Copy code below to file -> save
{% if section.settings.image != blank %}
{% assign mainImg = section.settings.image | img_url: 'master' %}
{% assign imgMobile = section.settings.image_2 | img_url: 'master' %}
<div class="img-banner">
{% if section.settings.url != blank %}
<a href="{{ section.settings.url }}">
{% endif %}
<picture>
<source media="(min-width:750px)" srcset="{{ section.settings.image | img_url: 'master' }}">
<source media="(max-width:749px)" srcset="{{imgMobile | defaul: mainImg }}">
<img src="{{ section.settings.image | img_url: 'master' }}" alt="{{ section.settings.image.alt }}">
</picture
{% if section.settings.url != blank %}
</a>
{% endif %}
</div>
<style>
.img-banner img,
.img-banner picture {
width: 100%;
}
</style>
{% endif %}
{% schema %}
{
"name": "Image banner",
"tag": "section",
"class": "section",
"disabled_on": {
"groups": ["header", "footer"]
},
"settings": [
{
"type": "image_picker",
"id": "image",
"label": "Desktop Image"
},
{
"type": "image_picker",
"id": "image_2",
"label": "Mobile Image"
},
{
"type":"url",
"id":"url",
"label":"Link To",
"default":"/collections/all"
}
],
"presets": [
{
"name": "Image banner",
"blocks": [
]
}
]
}
{% endschema %}
4. Go Customize -> click eye icon to hide custom liquid -> add Image banner section
This is an accepted solution.
Hi @VitaVibe,
Maybe I suggest you add a new section.
1. Go to Store Online-> theme -> edit code
2. Add a new section image-banner.liquid
3. Copy code below to file -> save
{% if section.settings.image != blank %}
{% assign mainImg = section.settings.image | img_url: 'master' %}
{% assign imgMobile = section.settings.image_2 | img_url: 'master' %}
<div class="img-banner">
{% if section.settings.url != blank %}
<a href="{{ section.settings.url }}">
{% endif %}
<picture>
<source media="(min-width:750px)" srcset="{{ section.settings.image | img_url: 'master' }}">
<source media="(max-width:749px)" srcset="{{imgMobile | defaul: mainImg }}">
<img src="{{ section.settings.image | img_url: 'master' }}" alt="{{ section.settings.image.alt }}">
</picture
{% if section.settings.url != blank %}
</a>
{% endif %}
</div>
<style>
.img-banner img,
.img-banner picture {
width: 100%;
}
</style>
{% endif %}
{% schema %}
{
"name": "Image banner",
"tag": "section",
"class": "section",
"disabled_on": {
"groups": ["header", "footer"]
},
"settings": [
{
"type": "image_picker",
"id": "image",
"label": "Desktop Image"
},
{
"type": "image_picker",
"id": "image_2",
"label": "Mobile Image"
},
{
"type":"url",
"id":"url",
"label":"Link To",
"default":"/collections/all"
}
],
"presets": [
{
"name": "Image banner",
"blocks": [
]
}
]
}
{% endschema %}
4. Go Customize -> click eye icon to hide custom liquid -> add Image banner section
Hi,
Thanks for your help..
Regards,
Vitavibe
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025