Personalize Gift Cards with a Custom Image
Upload a new image for your gift card
- From your Shopify admin, go to Online Store > Themes.
- Find the theme you want to edit, and click Actions > Edit code.
- In the Assets directory, click Add a new asset:
- Click Choose File to browse to the new gift card image on your computer and upload it. We suggest using a simple filename, for example
blue-giftcard.png
.
- Click Upload asset. The new gift card image will appear in your Assets directory. Take note of the file extension (
.png
or.jpg
)
Edit the gift card template file so that it uses your new image
- In the Templates directory, click
gift-card.liquid
. Find the following code within the file:
<img src="{{ 'gift-card/card.jpg' | shopify_asset_url }}" alt="">
Replace it with the following:
<img src="{{ 'blue-giftcard.png' | asset_img_url: '1024x1024' }}" alt="">
Click Save.
Preview your new gift card image
- From the theme code editor, in the top right-hand corner, click Customize theme.
- Open the theme editor.
- From the drop-down menu at the top of the page, or from the Templates menu on mobile, select Gift card.