How do I upload images for my website hosted on GitHub?

0
1
Asked By TechieExplorer92 On

Hey everyone! I'm trying to launch a website for my business and I'm running into some trouble with the picture uploads. I built everything in my VS Code app and it works locally, showing all my images perfectly. However, when I upload the same HTML file to my GitHub repo, the pictures aren't showing up.

Update: I managed to create a folder in GitHub and most of my images are now linked correctly, but there are still a few that aren't working. I'm checking the code to see what's different about those ones. If anyone has advice on this, please let me know!

Update 2: I've got it all figured out! Turned out it wasn't a coding issue; it just needed some time to process and everything fixed itself!

1 Answer

Answered By CodeGuru88 On

From what I recall, for images to appear on your GitHub Pages site, you need to upload them to the correct directory in your repo. GitHub has a help page that explains this, so you should definitely check it out! Here’s a link to the documentation: https://docs.github.com/en/repositories/working-with-files/using-files/working-with-non-code-files

ArtisticCoder101 -

Thanks for the tip! I'll take a look!

WebDevNinja77 -

I couldn’t figure it out at first, either. I thought maybe I need to set up my image paths like I did in VS Code, organizing the JPG and PNG files into folders. It seems like some people manage to create folders in their repos, but I’ve been confused about how to do that.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.