Images displayed in email are not the same as in cart

RussellHarper
New Member
1 0 0

We have a list of products with 1 oz and 2 oz variants. In the cart, the 2 oz variants show correctly, but in the emails sent to the customer, they show only the 1 oz variant.

From what we can tell, this is the relevant code in cart.liquid and customers/order.liquid:

cart.liquid - works correctly showing 1 oz or 2 oz variants as required

<a class="image" href="{{ item.url }}">
	{{ item | img_url: 'compact' | img_tag }}
	{% if settings.product-image-borders %}<span class="outline"></span>{% endif %}
</a>

 

customers/order.liquid - always shows 1 oz variant

<div class="image-wrap">

    {{ line_item.product.featured_image | product_img_url: 'small' | img_tag: line_item.product.featured_image.alt }}

    <a class="{% if settings.product-image-borders %}overlay{% endif %}" href="{{ line_item.product.url }}"></a>

</div>

 

In customers/order.liquid, would it make more sense to use line_item.image instead of line_item.product.featured_image? The documentation suggests the former has built-in variant handling, while the latter doesn't.

This customer emails were working okay before, and just recently started displaying this problem.

0 Likes