skip to Main Content

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


  1. Remove the entire Project from Github and update the src attribute to <img src="images/image-daniel.jpg" and upload the Project again .

    Login or Signup to reply.
  2. <img src="./images/image-daniel.jpg" alt="">
    
    

    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 the images folder is located in the same directory as the HTML file where the <img> tag is used.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search