Site is live. Images not loading. Brand new to git and hugo

Title says it all. The images seem fine in their folder in Git Hub, and they load on the local server as well.

All of the images I have included are linked int he metadata for the _index and post.md files like this:
"featured_image: “.image/jeep.jpg”
I’ve tried adding a slash (./image/jeep.jpg)
I’ve tried adding and removing the “.” (/image/jeep.jpg)

Nothing is working :frowning:

Here’s the repo:

Here’s the site:
alexagain.com

Thank you for your feedback: :slight_smile:

P.S, if I am breaching any etiquette, please tell me. I am new to this area of the internet.

Hi and welcome to the Hugo forum.

You seem to have forgotten to set the baseUrl in your hugo.yaml file not according to your domain, hence the images get the wrong base url / domain in your theme after publishing.

When you look at the header output in the dom-inspector, you’ll see that there is a line like:

<header class="cover bg-top" style="background-image: 
url('https://example.org/image/elephantrock.jpg');">

My suggestion to solve this:

Change the baseUrl to “baseUrl: alexagain.com”, in your hugo.yaml config-file, save it, do hugo-build again and it should work.

1 Like

ahh thank you. It works now!
For those with the same issue, I also realized that github is sensitive to caps. Not just in the title, such as “Picture.jpg”, but in the suffix, as in “Picture.JPG”.

Why would that be a GitHub issue? It depends on the file system, and most of them nowadays differentiate between upper and lower case. You’re better assuming that upper and lower case file names are different, always.

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