I guess writing
<img src="/assets/images/logo.svg" alt="some text">
will not work if I put my Kirby site on a sub-folder of my live website. And that there is a Kirby way of doing this which will ensure the image displays wherever the website is.
So I’ve tried doing this, but get a PHP error:
<?= image('assets/images/logo.svg')->url() ?>I’m guessing, because the logo file is outside of the Kirby Content folder - it is in the assets folder - it can’t find the url of the image, nor does the file have alt text.
So I’ve tried the following:
<img src="<?= url('/assets/images/logo.svg') ?>" alt="name of business">
This works. I’ve read other ways of doing this, but I don’t understand them. Can I just use the above?