How do you use second image in XML feed

RMWilsonWhole
Excursionist
13 0 2

I have a XML feed set up using a custom collection but would like to use the second image on each product as the main image for my feed. This is due to graphics I have on the main image and I'm led to believe google does not like this.

Would I be able to change the below code, maybe "product.featured_image.src" to achieve this? maybe to something like "product.second_image.src" 

<g:image_link>http:{% if variant.image.src %}{{ variant.image.src | product_img_url: 'grande' }}{% else %}{{ product.featured_image.src | product_img_url: 'grande' }}{% endif %}</g:image_link>

Thanks

0 Likes
RMWilsonWhole
Excursionist
13 0 2

I made a test XML feed and tried product.second_image.src and product.secondary_image.src but got an error: Generic image so i guess im changing the right part of the code but don't have the right file name for the non main image. Any ideas?

0 Likes