For my website, I use some img tags in partials, refering to some images I store in /static.
In local, I have no issue. But, when I deploy my website as Github Pages, I see that all my img tags refer to my root domain instead of the full baseUrl path I’ve set in Hugo configuration.
I read a lot of posts about this issue but I didn’t figure out how to fix it properly.
I’m really desperate as this is the only issue I have …
I had to put the whole src in double quotes but it works like a charm <img class="profile-image" src="{{ "images/profile.png" | relURL }}"/>
Thanks for your help guys !
I have a last question about image pathes which are dynamically built using context like: <img class="techno-image" src="{{ "images/technologies/{{.}}.svg" | relURL }}" />
In this case, {{.}} is not replaced by the current context value. Do you know if there is a solution to force replacing it before passing the string to relURL ?