Images not appearing on the pages, even if i upload them to github.

GitHub link: https://github.com/AhadWeb3/the-kim-way-photography Github Pages link: https://ahadweb3.github.io/the-kim-way-photography/ Should I change anything in the path?
6 Replies
Jochem
Jochem2y ago
anywhere you've got /assets you need to use ./assets /assets refers to https://yourdomain/assets while ./assets refers to https://yourdomain/subdir_you_are_in_now/assets, and your site is deployed to https://ahadweb3.github.io/the-kim-way-photography/. So /assets/logo.png is trying to find https://ahadweb3.github.io/assets/logo.png which doesn't exist. https://ahadweb3.github.io/the-kim-way-photography/assets/logo.png does though
Abdul Ahad⚡
Abdul Ahad⚡OP2y ago
i've given same structure in this https://github.com/AhadWeb3/NG-Photography-Portfolio worked fine. Maybe Is it because of the space between the name of the images?
Jochem
Jochem2y ago
/assets will work if the site is straight on the main domain, but if it's in a subdirectory like where you linked it won't work I changed the src of the logo img tag to ./assets/logo.png in dev tools and it loaded, so 🤷
Abdul Ahad⚡
Abdul Ahad⚡OP2y ago
so if i want to give path from root i have to use /the-kim-way-photography/assets/logo.png?
Jochem
Jochem2y ago
yes, but that would break if you deployed to thekimwayphotography.com for example ./assets would keep working
Abdul Ahad⚡
Abdul Ahad⚡OP2y ago
I actually had another mistake too. no spaces was one. github reads converts caps to small in extensions. like .JPG to .jpg. I was using .JPG so it didn't show up. thanks for the help
Want results from more Discord servers?
Add your server