Skip to content

Instantly share code, notes, and snippets.

@mikeott
Last active June 20, 2022 02:20
Show Gist options
  • Select an option

  • Save mikeott/885416e66340795ac97e0deb0c19e968 to your computer and use it in GitHub Desktop.

Select an option

Save mikeott/885416e66340795ac97e0deb0c19e968 to your computer and use it in GitHub Desktop.
Add hero image to shopify page
// Save this to the 'sections' directory...
{% if section.settings.hero_image %}
<img src="{{ section.settings.hero_image | img_url:'master' }}" alt="{{ section.settings.hero_image.alt | escape }}" />
{% endif %}
{% schema %} {
"name": "Hero Image",
"settings": [
{
"type" : "image_picker",
"id" : "hero_image",
"label" : "Image",
"info" : "Blah blah blah."
}
]
}
{% endschema %}
// ...and then include this section to 'page.liquid'
{% section 'hero-image' %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment