Skip to main content

Hello,

I am trying insert the dynamic image (variant) for my products in abandoned cart but when trying to see the preview,  the images of my products do not show up.  I have tried this code for the dynamic image:

{% if item.product.variant.images.0.src %}{{item.product.variant.images.0.src}}{%else%}{{item.product.images.0.src|missing_product_image}}{%endif%}

All my products with images are published in my Klaviyo account so it should be working, unless I’ve missed something.

 

Would you guys be able to help me by any chance?

Thanks!

Hey @Valentin Welcome to the community! It looks like you are using the correct syntax for the variant image to be shown. {% if item.product.variant.images.0.src %}{{item.product.variant.images.0.src}}{%else%}{{item.product.images.0.src|missing_product_image}}{%endif%}

Have you tried sending a test email instead of previewing it? Does the test email still not show the variant?


Hey Stephen,  Thank you for getting back to me. It finally worked and I can now see the photos of my product! Thanks!!


Hiya! I am having the same issue, though I’ve used the code listed above and I’m still not having the images load (see attached image). Is this more of an issue with our the connection between Klaviyo and Shopify vs. an issue with my Dynamic Image code? 

This is from an automated flow email, specifically an ‘Abandoned Cart’ email flow.

Appreciate any help on this! 

 


Hey ​@Brooke_Gillard,

That does appear to be an issue with your connection with Shopify! When you visit your product catalog https://www.klaviyo.com/catalog/items and search one of these two items, are they displaying the correct images, or are the images also blank in your catalog? If they are blank, you might have to resync the catalog items by pressing “Resync item” on either a product page, or a page of your catalog. If that still isn’t working, I’d recommend reaching out to our support team at klaviyo.com/support, who can take a look at your integration to double check to ensure that catalog data and events are syncing over correctly!


Hi Byrne, 

Thanks so much for your reply! I managed to get a customer service agent to help out with our back end. If anyone is reading this with the same issue, my core problem was that the product selection hadn’t been updated/resynced in a while, so any new products were not showing up correctly. 

Thanks for the help!!