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
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 thoughi'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?
/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 🤷so if i want to give path from root i have to use
/the-kim-way-photography/assets/logo.png?yes, but that would break if you deployed to thekimwayphotography.com for example
./assets would keep working
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