Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Just exceptional. Thank you so much, Jack, you smashed it.

— Hugo, Developer

Asset Tag

The Asset (singular tense) tag retrieves single assets by their URL.

Overview

The Asset tag's primary purpose is to retrieve Assets by their URL. Pass the URL into the url parameter and voila. To say it did any more than that would be a lie.

Example

{{ asset url="/img/brand/logo.png" }}
<img src="{{ url }}" alt="{{ alt }}">
{{ /asset }}

Parameters

url

string

The path to the file, relative to the web root.

Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →
Hello there! Are you looking for the Statamic v2 documentation?