Adding Product Image to Confirmation Email

Highlighted
New Member
9 0 0

This solved my problem! Thank you!

0 Likes
Highlighted
Excursionist
21 0 6

Hey everyone, just thought I would add a solution that worked for me on this! 

I also use Klaviyo as the template builder. I replaced their default holding image and selected the text box, then added this in as the source code, works on both order confirmation, shipping confirmation etc! 

    {% for line in line_items %}
    <img src="{{ line | img_url: 'thumb' }}" />
    {% endfor %}

I have also uploaded an image. Hope this helps someone!
 

The Future Kept is an online purveyor of well designed, durable, meticulously chosen goods for you to cherish and keep.
0 Likes
Highlighted
Tourist
6 0 1

when inputting this for product images:

<img src="{{ line.product.featured_image | product_img_url: 'small' }}" />

does anyone else get an error from Klaviyo's template import tool that says "We can't use this template... Invalid template filter: product_img_url." Klaviyo doesn't seem to like the 'product_img_url' filter or the 'img_url' filter.

I did a Klaviyo work around (inserting the code into my Abandoned Cart template in Shopify's notification center) but now I have to play the 6 hour waiting game......

Thought I'd ask in the mean time!

0 Likes
Highlighted
Excursionist
21 0 6

I have just figured out a better and simpler solution to the one I posted above, hopefully this helps save someone the hour or so it just took me! 

If using Klaviyo, in your templates, replace the default image holder and replace the code in each one with the following when you go to add it back into the line.

Order Confirmation.
{{ line | img_url: 'small' }}

Shipping Confirmation
{{ line.line_item.image | img_url: 'small' }}

Screenshots attached, hope this helps!

 

The Future Kept is an online purveyor of well designed, durable, meticulously chosen goods for you to cherish and keep.
0 Likes
Highlighted
Tourist
6 0 1

Thanks Dean!

Now, let the waiting game begin (again...) :)

0 Likes
Highlighted
Tourist
6 0 1

ONE MORE THING! Has anyone been able to get the variant images to show in their abandoned cart? I can get the product images with this code:

<img alt="{{ line.title }}" src="{{ line.product.featured_image | product_img_url: 'small' }}" />

But I can't seem to get the variant images to work...

For the record (using Klaviyo):

here's the image code for our successful order confirmation email:

<img alt="line.title" src="{{ line | img_url: 'small' }}" />

and our successful shipping confirmation email:

<img alt="line.line_item.title" src="{{ line.line_item.image | img_url: 'small' }}" />

Thanks everyone for posting and working through this :)

0 Likes
Highlighted
Tourist
37 0 1

Hi! Anyone got a solution for the picture in the abandon cart mail?

0 Likes
New Member
4 0 0

Really struggling with this for Browse Abandonment emails - somehow have cracked Abandoned Cart thanks to this amazing feed of info (thanks guys!) but have NO coding knowledge so don't know how I should be tweaking this for Browse Abandonment - any ideas much appreciated!

0 Likes