Reputation: 13
I've been trying to load photos and favicon on GitHub pages for a month now and no result at all. Even tried with a boilerplate project from npx create-next-app@latest
and it doesn't load the images and favicon from a public folder at all. It's not the path obviously it's something from the configs, I guess, but I can't find a solution; even ChatGPT can't help. Any guidance would be appreciated.
Upvotes: 1
Views: 953
Reputation: 11
I had the same problem last time. I was able to figure it out, in my case the images were in Capitalize, and GitHub pages are very sensitive about file names. :
Please go ahead and check the following:
<Image className={styles.logo} src="./next.svg" alt="Next.js Logo" width={180} height={37} priority />
I hope this will fix this. :)
Here is my build on github pages:
Upvotes: 0