How to set a default image on product pages.

Solved
keithlan18
Tourist
3 1 0

Hi, I'm trying to accomplish something very simple. I need the second image to be the one that is featured. I will also like to remove the thumbnails. I'm using the debut theme. Screen Shot 2020-05-03 at 8.10.21 PM.png

0 Likes
VishvasMishra
Shopify Partner
189 38 45

Hi @keithlan18,

Please just clear you want to show first image as featured image on the collection page on product and second image as featured image on the product page only also you want to remove thumbnails.

Thanks and regards,
Webster.

For Design, Development and custom changes Hire Me.
If your problem solved then Like & Accept this Solution.
Email ID: technicalvishvas@gmail.com
0 Likes
keithlan18
Tourist
3 1 0

Yes!!!


0 Likes
VishvasMishra
Shopify Partner
189 38 45

This is an accepted solution.

Hi @keithlan18,

you have to use replace the code 

{{  product.featured_image | img_url: 'master' }}

by

{{  product.images[1] | img_url: 'master' }}

 Thanks and regards,
Webster

For Design, Development and custom changes Hire Me.
If your problem solved then Like & Accept this Solution.
Email ID: technicalvishvas@gmail.com
keithlan18
Tourist
3 1 0

This is an accepted solution.

Thanks for your help. I ended up figuring it out. I found that editing the code

{%- assign featured_media = first_available_variant.featured_media | default: product.images[1]%}

 

adding in the 

product.images[1]

after default worked for me.  

0 Likes
rokyy98
New Member
1 0 0

Hi may I know in which file did you change the code?

0 Likes