How can I change the gift card image?
In this article, we will teach you how to change the default gift card image on the store's gift card page.
Upload the gift card image
In your Shopify admin, navigate to Content > Files and upload your image. Take note of the file name as we'll need it later.
Shopify's recommended size for gift card images is 950px by 550px.
Find the default gift card image
First, open the code editor by clicking the ... button > Edit code.
You’ll be looking for the gift_cart.liquid file in your Templates folder and find the following code:
{%- render 'image-element',
asset: 'gift-card/card.jpg',
type: 'asset',
alt: 'Gift card illustration',
sizeVariable: '588px',
-%}
For older theme versions, look for this code:
<img src="{{ 'gift-card/card.jpg' | shopify_asset_url }}" alt="Gift card illustration">
Edit the code with the new image
You'll be replacing the code above with this one:
<img src="{{ 'gift-card.png' | file_url }}" alt="Gift card illustration">
Make sure to change 'gift-card.png' with the file name of your image. Don't forget to click save to confirm the changes.
Preview the gift card page
Login to your theme editor and select Others > Gift card in the top dropdown.