[SOLVED] Very basic image link issue?

Hi all, new to Jekyll but heard lots of good stuff.

In short, I have a broken image link issue but can’t work out where I am going wrong. Using Jekyll Now theme.

I am building the site locally and then uploading to a website. In config I have:

avatar: images/my_logo.png
url: https://portal.mysite.com
baseurl: "https://portal.mysite.com"

All my images are in an /images sub-directory at the root. My main page works and the site avatar is displayed.

But I have a page, about.md, which when built is accessible at:

https://portal.mysite.com/about/

But if I go to that page then the site logo avatar is broken image link, and does not display… it links src to:

https://portal.mysite.com/about/images/my_logo.png

Hence, for all permalinks it is breaking because it is trying to find the image in a sub-directory of the page permalink.

What obvious setting am I screwing up here?!

how are you building the link? it needs a / at the beginning to start at the root, I’m guessing you are missing that.

Baseurl should not be set as you have it, but I am guessing you are not adding it to your links, so no big deal? baseurl should be blank unless the site is being served from a sub directory.

Ah thanks, it is because avatar was defined without the leading ‘/’

Previously as above it was:

avatar: images/usf_logo.png

Now like this it works:

avatar: /images/usf_logo.png