Customer Gift Card image on customer Email/Notification to match purchased gift card image

Topic summary

A user is attempting to customize gift card email notifications so that the image displayed matches the specific gift card variant purchased. They have two different gift card designs and want the corresponding image to appear in customer emails.

Current Issue:

  • Multiple code attempts have failed
  • The provided code snippet appears corrupted or reversed (text is backwards)
  • Implementation involves Liquid templating with conditional logic to match variant titles to specific images

Technical Approach:

  • Using {% for line in gift_card_line_items %} loop
  • Attempting conditional statements to check variant titles (“Thank You” and “Gift For You”)
  • Trying to display corresponding images using asset_img_url filter

Status:

  • The discussion remains open with no solutions provided yet
  • The user acknowledges their code attempt is “no bueno” and is seeking assistance
Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

Hello

Hope all is well

We have 2 gift cards with 2 different images, and would like the gift card image in the customer email/notification to match the purchased gift card image.

Tried several times to update the code to no avail. Any help will be much appreciate it!!!

Below is copy of our last attempt, we know it’s no bueno

{% for line in gift_card_line_items %}

{{ line.variant.title }} × {{ line.quantity }}

{% if line.variant.title == “Gift-For-You” %}
Gift For You

{% elsif line.variant.title == “Thank-you” %}
Thank you
{% else %}

Sorry, we couldn't find the gift card variant.
{% endif %}
{% endfor %}