I have uploaded my project it showed all images when I am working in localhost. When I upload to GitHub the image is not loading.
My GitHub Page: https://mohammedimjan.github.io/protofoli-site/
Thank You.
I have uploaded my project it showed all images when I am working in localhost. When I upload to GitHub the image is not loading.
My GitHub Page: https://mohammedimjan.github.io/protofoli-site/
Thank You.
Your image source links are like https://mohammedimjan.github.io/Images/image-name.jpg
You should change these to the image links that you can get from the repo of your page (https://github.com/mohammedimjan/protofoli-site)
Repo > Images > Image > Right Click to Image > Get the image link
Your profile link: https://github.com/mohammedimjan/protofoli-site/blob/main/Images/profile.jpg?raw=true
And your hero link: https://github.com/mohammedimjan/protofoli-site/blob/main/Images/hero.jpg?raw=true
Here is the fix,
index.html > Line 47 > <img src="Images/profile.jpg" alt="">
style.css > Line 11 > background-image: url(https://i.ibb.co/TKvQgnK/hero.jpg);
In the style.css > line 11 > I hosted your image and added a link in the style.css file. Otherwise, I suggest you move the images folder into the style folder and link that into the CSS and HTML file.
I added the solution to your GitHub issue also. :)
Here is the link for more info: https://www.delftstack.com/howto/css/background-image-not-showing-css/
I just inspected the path of your images and I found that you do it like this. src="/Images/profile.jpg" when you should do it like this: src="./Images/profile.jpg"
Why?
because file location matters.
<img src="picture.jpg"> The "picture.jpg" file is located in the same folder as the current page
<img src="images/picture.jpg"> The "picture.jpg" file is located in the images folder in the current folder
<img src="/images/picture.jpg"> The "picture.jpg" file is located in the images folder at the root of the current web
<img src="../picture.jpg"> The "picture.jpg" file is located in the folder one level up from the current folder