Different Product Featured Image on Homepage Prestige Theme

Dylan_Propeller
Shopify Partner
24 0 3

Hey Community, 

I'm looking for a solution to a problem that I'm facing with my development store. 

Basically, I would like the product images of a collection featured on the homepage to be different images from the featured image on the single product page. 

So to clarify, is it possible for the collection to feature the 2nd image featured on the single product page rather than the 1st? 

Thanks in advance!

 

Replies 4 (4)

Developer-G
Shopify Partner
3079 604 856

Hello @Dylan_Propeller ,

Yes it's possible.
Use this code to get 2nd image of product 

{%- if product.media[1] -%}
{{ product.media[1] | img_url: '786x' }}
{%- endif -%}

Use it a/to your need.

Thanks

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
-Advance Search Filter
Dylan_Propeller
Shopify Partner
24 0 3

@Developer-G thank you for your response and code! 

Will this be added to featured-product.liquid? 

Thanks!

Developer-G
Shopify Partner
3079 604 856

Depends on the theme structure you are using. 

btw you have to just find out the code which is use to display the features image and replace it with provided one.
Thanks

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
-Advance Search Filter
Dylan_Propeller
Shopify Partner
24 0 3

@Developer-G thanks for your help! 

Having some difficulties finding where exactly to insert this coded. If anyone could help it would be amazing. 

I presume it is in featured-collections.liquid but I could be wrong? 

Keep in mind I am using the Prestige Theme. 

Here's my store link https://the-skincare-edit-united-arab-emirates.myshopify.com/ password - hubuth

I'm pretty sure this code will work as I've used it for featured products.

 

 

 

 

<img src="{{ product.images[1] | product_img_url: 'large' }}" alt="{{ product.images[1].alt | escape }}" />

 

 

 

 

I need this to work on featured collections. 

Thanks in advance!