Different Product Featured Image on Homepage Prestige Theme

Dylan_Propeller
Excursionist
17 0 2

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!

 

0 Likes
Guleria
Shopify Partner
1781 375 530

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

Want to modify or custom changes on store hire me.
Email: guleriathakur43@gmail.com, Skype: navrocks1
If helpful then please Like and Accept Solution.
Buy me a coffee ☕ My PayPal
Dylan_Propeller
Excursionist
17 0 2

@Guleria thank you for your response and code! 

Will this be added to featured-product.liquid? 

Thanks!

0 Likes
Guleria
Shopify Partner
1781 375 530

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

Want to modify or custom changes on store hire me.
Email: guleriathakur43@gmail.com, Skype: navrocks1
If helpful then please Like and Accept Solution.
Buy me a coffee ☕ My PayPal
Dylan_Propeller
Excursionist
17 0 2

@Guleria 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!

 

0 Likes