Waht’s the current kirby3 and right way to render a brand logo image from
assets/images/ in the header navigation???
Or is there a better way to store such global images instead in the
assets/images/-folder (since it is not in the starter package) and refernce them …
I personally use:
<img src="<?= url('assets/images/logo.png')?>">
If you need an asset object (for example, if you want to resize the image), you can use the Asset class
$logo = new Asset('assets/images/logo.png);
asset() helper makes this even easier:
$logo = asset('assets/images/logo.png);
Does K3 has the possibility to inline .svg files?
So that a
<svg><path ....></svg>-tag gets inserted??
Yes, that’s possible with
$logo = asset('assets/images/logo.svg');
There’s even an inline svg() helper
<?= svg('assets/images/logo.svg') ?>
I think the Asset class and
asset() helper are still undocumented - searching for them in the docs yields no results.
Yes, that is true. There is already an open issue.