Twig-assets, font awesome

Hi, i can successfully add this CSS to my site

assets({files: ['vendor/fontawesome/css/all.min.css'], name: 'fontawesome.css'})

But it cannot resolve

src: url("../webfonts/fa-regular-400.eot");

from the css… the path is all correct. Im out of ideas…

The webfonts are relative to the css file. In your case the webfonts should be placed
in vendor/fontawesome/webfonts/.

1 Like

Thanks for quick reply!

They already are:


'twigSettings' => [
        'path' => __DIR__ . '/../templates',

and the CSS is in


Yes, but templates/ is an internal directory and must never be accessible in the web. Only the public/ directory is “public” and can be accessed via the internet. So there should be a directory like public/webfonts.

1 Like

Ah ! I see now…
God i feel so stupid some times…

The JS and CSS is loaded from public/cache/, thats why they’re accessible…
Moved “webfonts”-folder to public and now it works… Thank you!