Shopify

Elevate Your Brand: A Definitive Guide to Customizing Shopify Gift Card Images

Hey there, fellow store owners! As your Shopify migration and development experts at Shopping Cart Mover, we often see common questions pop up in the community that, while seemingly small, have a huge impact on brand perception. One such recurring query revolves around customizing the default Shopify gift card image. It might seem like a minor detail, but a beautifully branded gift card can significantly elevate your customer experience and reinforce your unique brand identity. After all, who wants a generic red gift box when their brand is all about sleek minimalism or vibrant artistry?

Recently, we noticed a great discussion in the Shopify Community forums where a store owner, acote, was grappling with this exact challenge. They wanted to replace the standard red gift image on the customer's gift card page with their own custom design. They had even managed to locate the right spot in the code and delete the default image, but couldn't get their custom image to display. Sound familiar?

Shopify theme code editor showing Assets folder and 'Add a new asset' button
Shopify theme code editor showing Assets folder and 'Add a new asset' button

The Challenge: Swapping Out the Default Gift Card Image

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

Gift card

The core of the problem, as often is the case with Shopify customizations, lies in understanding how Liquid filters interact with file storage. The key here is the shopify_asset_url Liquid filter. This is where much of the confusion often originates.

Understanding Shopify's File Management: Files vs. Assets

Before we dive into the solution, it's crucial to clarify Shopify's two primary methods for storing and referencing images and other files:

1. Content > Files (Admin > Content > Files)

  • Purpose: This is your general repository for files like product images, blog post images, PDF documents, or any media that isn't directly tied to your theme's styling or functionality.

  • Referencing: Files uploaded here are theme-agnostic. You reference them using Liquid filters like file_url or file_img_url. For example:

  • Benefit: Images here persist even if you change or delete your theme, making them ideal for content that should remain consistent across different theme versions.

2. Online Store > Themes > Edit Code > Assets Folder

  • Purpose: The Assets folder within your theme's code editor is specifically for files that are integral to your theme's design and functionality. This includes CSS files, JavaScript files, font files, and images that are directly used by your theme's templates or stylesheets.

  • Referencing: These files are referenced using Liquid filters like asset_url or shopify_asset_url. For example:

  • Consideration: Assets are tied to a specific theme. If you unpublish or delete a theme, its assets go with it. Notification emails, in particular, often rely on these theme-specific assets for their imagery.

The Gift Card Image Nuance: Where the Community Clarified

This is where the Shopify gift card system introduces a unique requirement, leading to the conflicting advice seen in the forum thread. While tim_1's advice about `file_url` for general images is perfectly sound, Goodness.Michael hit the nail on the head for gift card *emails* and often the customer's gift card *page* itself: these templates frequently look for images specifically within the theme's Assets folder, referenced by shopify_asset_url.

The notification system, particularly for gift cards, is often hardwired to pull images from the active theme's Assets. If your image isn't there, or if the filename doesn't match what the Liquid code expects, it simply won't show up. This is why acote was struggling even after deleting the default image – the new image wasn't in the expected location or wasn't referenced correctly.

Step-by-Step Guide: Customizing Your Shopify Gift Card Image

Ready to ditch the generic red box and embrace your brand? Here's how to do it correctly:

Step 1: Prepare Your Custom Gift Card Image

  • Design: Create your branded gift card image. Common dimensions are around 600x300 pixels, but check your theme's existing gift card image for ideal aspect ratios.
  • Format: Use a web-friendly format like JPG or PNG.
  • Filename: Choose a simple, descriptive filename (e.g., my-custom-gift-card.jpg).

Step 2: Upload Your Image to the Theme's Assets Folder

This is the critical step for gift card images:

  1. From your Shopify admin, go to Online Store > Themes.
  2. Find your current theme, click Actions > Edit code.
  3. In the code editor, navigate to the Assets folder on the left sidebar.
  4. Click Add a new asset.
  5. Upload your custom gift card image (e.g., my-custom-gift-card.jpg).

Step 3: Locate the Gift Card Template File

The image reference is typically found in the gift_card.liquid template. However, some themes might include it via a snippet.

  1. In the theme code editor, use the search bar (or browse the Templates folder) to find gift_card.liquid.
  2. If you don't find the image reference directly there, look for included snippets (e.g., {% include 'gift-card-image' %}) and check those snippets in the Snippets folder.

Step 4: Modify the Liquid Code

Once you've found the relevant tag, you'll need to update its src attribute.

Original Code (example):

Gift card

Modified Code:

My Branded Gift Card
  • Replace 'gift-card/card.jpg' with the exact filename of your uploaded image (e.g., 'my-custom-gift-card.jpg').
  • Ensure you keep the shopify_asset_url filter.
  • Update the alt text for better accessibility and SEO.
  • Click Save.

Step 5: Test Thoroughly

After saving your changes, it's crucial to test:

  • Preview: Generate a test gift card and view its customer page.
  • Email: Send a test gift card email to yourself to ensure the image appears correctly in various email clients (Gmail, Outlook, Apple Mail, etc.).

Important Considerations & Best Practices

  • Backup Your Theme: Always, always duplicate your theme before making any code changes. This provides a quick rollback option if something goes wrong.

  • Work on a Development Theme: If possible, make these changes on a duplicate theme that's not live, then publish it once you're confident everything works.

  • Image Optimization: Ensure your custom image is optimized for the web (compressed, appropriate dimensions) to maintain fast loading times.

  • Future-Proofing: Be aware that major theme updates could potentially overwrite custom changes. If you anticipate frequent theme updates, consider using a custom snippet that's less likely to be overwritten, or document your changes carefully.

  • Consistency: Ensure your gift card image aligns with your overall brand guidelines for a cohesive customer experience.

Beyond the Gift Card: When to Use `file_url`

While the Assets folder is key for gift cards, remember that tim_1's advice about file_url and file_img_url for images uploaded to Content > Files is still highly relevant for other parts of your store. For blog post images, static page content, or product descriptions, uploading to Content > Files and using the `file_url` filters is generally the recommended approach, as it decouples your content from your theme.

Conclusion

Customizing your Shopify gift card image is a small but impactful way to enhance your brand's presence and provide a more polished experience for your customers. By understanding the nuances of Shopify's file management and correctly utilizing the shopify_asset_url filter within your theme's Assets, you can easily transform a generic gift into a branded delight.

If you're embarking on a Shopify migration or need assistance with complex customizations and integrations, don't hesitate to reach out to the experts at Shopping Cart Mover. We're here to ensure your e-commerce journey is smooth, efficient, and perfectly tailored to your brand's vision.

Share:

Use cases

Explore use cases

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

Explore use cases