Get access to the "asset" directory?

Hello there,

I want to use a snippet for my header and the navigation on different subpages. In this navigation I want to include the brands logo. Because the path is getting deeper for every sub page I need to use the kirby roots method because other wise the path is not correct.

At the moment I am trying this:
<img src="<?php echo kirby()->roots()->assets().'/images/logo.svg' ?>" alt="logo">

to get the right path for the logo no matter on what sub page I am navigating to.
How ever I get the access error:

sub page xyz: Not allowed to load local resource: file:///C:/xampp/htdocs/kirby/app/assets/images/logo.svg

Any idea how I can properly load that logo from my asset folder? Do I have to change the .htacces file? How?

You can do it like this:

<?= url('assets/images/logo.svg) ?>

Oh that was very fast :slight_smile: .

That works perfect,
thank you.