Solved

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

  • 29 August 2023
  • 2 replies
  • 346 views

Badge

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.

icon

Best answer by Spark Bridge Digital LLC 29 August 2023, 14:13

View original

2 replies

Userlevel 6
Badge +31

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. 

Badge +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?

Reply