Unlock Your Brand: How to Customize Your Shopify Gift Card Image (The Right Way!)

Hey there, fellow store owners! Let's talk about something that comes up surprisingly often in the Shopify community: customizing your gift card images. It might seem like a small detail, but a branded gift card can really elevate your customer experience and reinforce your brand identity. Nobody wants a generic red gift box if their brand is all about sleek minimalism or vibrant artistry, right?

Recently, we saw a great discussion pop up in the Shopify Community forums where a store owner, acote, was trying to do just this. They wanted to swap out the default red gift image on the customer's gift card page for their own unique design. They'd even managed to find the right spot in the code and delete the default image, but couldn't get their custom image to show up. Sound familiar?

The Challenge: Swapping Out the Default Gift Card Image

acote shared a screenshot of the code they were working with, which is super helpful for diagnosing these kinds of issues:

As you can see, the code snippet likely looks something like this (or similar, depending on your theme and Shopify's updates):

Gift card

The key here is the shopify_asset_url Liquid filter. This is where the confusion often lies.

Where the Community Stepped In (and Clarified!)

When acote posted their question, the community jumped in to help, and honestly, it highlighted a common point of confusion. We had two different suggestions initially:

The "Assets Folder" Suggestion

One helpful member, Goodness.Michael, suggested that for gift card emails, the image must be uploaded to the theme’s Assets folder (specifically, Online Store → Themes → Edit code → Assets) and that the filename has to match exactly. This approach would involve using the shopify_asset_url filter, pointing to an image within your active theme's assets.

The "Content > Files" Recommendation (The Best Practice!)

However, another expert, tim_1, provided a really insightful and crucial clarification. They pointed out that the shopify_asset_url filter is actually designed to refer to a limited set of files centrally hosted by Shopify, or assets within your *current theme*. The problem? Your custom file isn't necessarily in that "centrally hosted" set, and more importantly, tying a critical image like a gift card to your *theme's assets* can lead to problems down the road.

Here's why tim_1's advice is the gold standard:

  • Theme Dependency: If your gift card image is in your theme's Assets folder, what happens when you unpublish that theme? Or remove it entirely? Poof! Your gift card image could be gone with it.
  • Notification Emails: As tim_1 wisely noted, "Notification e-mails processor has no idea what’s your current theme." This is a big one. Gift card emails are sent independently of your active theme. They need a stable, universally accessible image URL.
  • The Right Tool for the Job: For images you upload yourself that need to persist regardless of your theme, Shopify provides Content → Files. This is essentially Shopify's CDN (Content Delivery Network) for your uploaded media.

So, the definitive answer, and the robust best practice, is to use Liquid filters: file_url or Liquid filters: file_img_url to reference images uploaded to your Content → Files section.

Step-by-Step: How to Customize Your Shopify Gift Card Image Reliably

Ready to get your custom gift card image looking perfect and staying put? Here's how you do it, following the best practices shared by our community experts:

1. Upload Your Custom Gift Card Image to Shopify Files

  1. From your Shopify admin, navigate to Content → Files.
  2. Click the "Upload files" button.
  3. Select your custom gift card image from your computer and upload it.
  4. Once uploaded, you'll see a list of your files. Find your newly uploaded image and click the link icon next to it to copy its URL. This URL is what we'll use in our code. It'll look something like https://cdn.shopify.com/s/files/1/your-store-id/files/your-gift-card-image.jpg?v=some-version-number.

2. Locate Your Gift Card Template Code

The code for your gift card image is usually found in the gift_card.liquid template file, which governs the appearance of the digital gift card page your customers receive. It might also be in a notification email template if you're trying to modify the email itself.

  1. From your Shopify admin, go to Online Store → Themes.
  2. Find your Current theme and click "Actions" → "Edit code".
  3. In the theme editor, look for a file named gift_card.liquid under the "Templates" directory. If you're modifying an email notification, you might need to go to Settings → Notifications and edit the specific Gift Card notification template there.

3. Replace the Old Image Reference with Your New File URL

Now for the actual code change! You'll be replacing the line that uses shopify_asset_url with a direct reference to your uploaded file.

  1. In your gift_card.liquid file (or notification template), find the line similar to what acote shared:
    Gift card
  2. Replace the src attribute content. Instead of using the shopify_asset_url filter, you'll either directly paste the URL you copied from Content → Files, or, even better, use the file_url filter for robustness.
  3. Option A (Direct URL - simpler, but less dynamic):
    Your Custom Gift Card

    Remember to replace the placeholder URL with your actual copied URL.

  4. Option B (Using file_url filter - recommended for theme files):

    If you prefer to leverage Liquid for the file reference (which can be slightly cleaner if you define the file name), you would use the file_url filter. First, ensure your image is indeed named something like my-custom-gift-card.jpg when you upload it to Content → Files. Then, your code would look like this:

    Your Custom Gift Card

    Note: The file_url filter expects the filename string that matches what you uploaded to Content → Files, not the full CDN URL. Shopify automatically resolves it.

  5. Click "Save".

After saving, test your gift card flow! Send yourself a test gift card to make sure your beautiful new branded image appears exactly as you intended on the customer's gift card page and in any associated emails.

This little tweak, once you know the right approach, makes a huge difference in delivering a polished, professional brand experience. A big thanks to tim_1 and Goodness.Michael for kickstarting the discussion and helping us all understand the nuances of asset management in Shopify. It just goes to show how invaluable our community is for navigating these technical waters!

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases