Last updated 4 years ago
Was this helpful?
All the asset files uploaded in the asset folder can be accessed through the asset_url variable (checkout for more information)
example:
<link href="{{ asset_url ~ 'style.css' }}" rel="stylesheet" /> <body> <div class="app"> <img src="{{ asset_url }}image.png" alt="" /> </div> <script src="{{ asset_url ~ 'main.js' }}"></script> </body>
{{ asset_url ~ 'style.css' }} is a way of concatenating two strings in Twig