Skip to main content
Solved

What dynamic variable to use to show product image in emails?


Forum|alt.badge.img+1

Hello,

We're newcomers to Klaviyo and have a query about incorporating dynamic images into our email. Could you please guide us on locating the variable we should include to ensure dynamic images display in our email campaigns? Or, how do we define this?

 



For further details, please refer to the attached screenshot.

Thank you.

Best answer by Spark Bridge Digital LLC

To find that variable, click ‘Preview & Test’ in the top right corner. There you will find all of your variable data that you can copy into the area you screenshot. You’d just need to find the one labeled for product image source.

Here are some guides on it:
https://help.klaviyo.com/hc/en-us/articles/115002779071

Depending on your integration and trigger of your message, the variable could be:

{{ event.extra.line_items.0.product.images.0.src }}

But that depends on the trigger metric of your message/flow.

If this is only a campaign send with no trigger metric, then there won’t be dynamic event data to feed into this message. 

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

Spark Bridge Digital LLC
Partner - Gold
Forum|alt.badge.img+33

To find that variable, click ‘Preview & Test’ in the top right corner. There you will find all of your variable data that you can copy into the area you screenshot. You’d just need to find the one labeled for product image source.

Here are some guides on it:
https://help.klaviyo.com/hc/en-us/articles/115002779071

Depending on your integration and trigger of your message, the variable could be:

{{ event.extra.line_items.0.product.images.0.src }}

But that depends on the trigger metric of your message/flow.

If this is only a campaign send with no trigger metric, then there won’t be dynamic event data to feed into this message. 


Forum|alt.badge.img+3

I have a question, what if i have a “for” loop for a Purchase Confirmation flow where I show all the products purchased, I want to show the image of each product dynamically, not specifying it to be “0,1,2...etc” how do I do that?