Skip to main content

tags/asset

Link to an asset from your theme’s assets folder.

{% asset 'path' %}

Arguments

Name Type Default Description
path str Required. The path to your asset from within your theme’s assets folder.

Description

The asset tag ensures your theme’s assets are linked to correctly. Your uploaded theme will be stored in a unique location on a content delivery network and so the absolute URL of your theme’s assets won't be known until after upload. By using the asset tag the URLs of your assets will be correctly resolved.

Examples

The following example assumes there is an image called logo.png within the theme’s assets/images folder.

.
├── /assets
|   └── /images
|       ├── logo.png

Input

<img src="{% asset 'images/logo.png' %}">

Output

<img src="https://themes.typed.com/d2ffd1b5-4585-48ad-9553-7cccda8d573b/assets/images/logo.png">