SVG Logo only renders in list and not in singles

Hey there,

Trying to figure out an issue with a SVG logo not working on single files, even though it works on list templates.
I have the svg stored in static dir and use it as an img. The image renders correctly on the list view but when I visit one of the single pages the image only displays the alt tag.
List page:


Single page:

header.html:

<div class="flex justify-center items-center">
    <img src="logo.svg" alt="Nekalbu logo" class="max-h-24"/>
</div>
{{ if .Page.IsHome }}
<div class="pl-[5%] pr-[5%] pt-[2%] flex flex-col justify-center text-nk-white">
    <span class="self-center tracking-wider">Choose your lesson</span><br/>
    <span class="self-center tracking-wide font-extralight mb-5">and start learning</span>
</div>
{{ end }}

The path to the image should begin with a slash.

2 Likes

Thanks. I got a little mixed up with assets and static content.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.