Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hey there Shopify community!
I am trying to edit the Featured-Product section in Refresh Theme. I want it to feature the third image in the product page, not the primary image by default. I don't wish to change the main product image, because that will change the look of my store and collection pages. I only want to show the tertiary image on the Featured Product Section.
Can anyone help?
{% assign third_image = featured_product.images[2] %}
{% if third_image %}
<img src="{{ third_image | img_url: 'master' }}" alt="{{ featured_product.title }}" />
{% else %}
<img src="{{ featured_product.image | img_url: 'master' }}" alt="{{ featured_product.title }}" />
{% endif %}
This code checks if the product has a third image. If it does, it will display that image; otherwise, it will fall back to the primary image.
Thanks... where do I add this snippet? Every time I try to add it, the page breaks 😕
@NomtechSolution thanks... but where do I add this snippet? Every time I try to add it, the page breaks 😕
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025