How to add the variant image as dynamic image in a abandoned cart flow?

  • 9 April 2024
  • 3 replies

Badge +1


I use Shopify and I am trying to create the Abandoned Cart flow, however when I add the dynamic image variable, it’s pulling the product’s first image, and not the variant image that is actually added to the cart. Does anyone know if its possible to populate the variant’s image so I do not confuse the recipient? I am using the variable available in the Help Site and from the event trigger info: 

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

Best answer by retention 9 April 2024, 18:40

View original

3 replies

Userlevel 7
Badge +58

Hi @bunnyb, welcome to the community!

You should be able to use the variant images (if there is one), try this in your image block image source value: 

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

Note, this shows the first line item’s first variant image from a “Started Checkout” Shopify event.


If you are showing this in a looped Table Block, where your Row Collection is repeating over every: event.extra.line_items with an alias of item, the code will look like this in the Dynamic image field:




Like this:


See if that works for you!

Badge +1

Hello @retention,

That worked like a charm.  Thanks so much.

I think it would be beneficial to other users that may have the same question as me and use the Klaviyo Knowledge Base as reference, if this information was added to Step 6: add an image and to the Shopify table in this article.


Thanks again!

Hi there, I’m looking for the same solution. 


I have tried inserting this solution into the dynamic image source within the Klaviyo pre-built template and nothing seems to work.

This is the exported code that creates broken images: