I added a project site to my Github project. But all the photos are not displaying in the site.
The Code I used is
<img src="/images/image-daniel.jpg" alt="">
I saw some solutions before and updated my code to
<img src="images/image-daniel.jpg" alt="">
But when I go to the inspect It still shows the code
<img src="/images/image-daniel.jpg" alt="">
2
Answers
Remove the entire Project from Github and update the src attribute to
<img src="images/image-daniel.jpg"
and upload the Project again .When hosting your project site on GitHub, the path to your images should be relative to the root of your repository. Using
./
at the beginning of the image path indicates that the image should be fetched relative to the current directory. Make sure that theimages
folder is located in the same directory as the HTML file where the<img>
tag is used.