htmlgithubhosting

Image not appearing, instead the alt value is showing


index.html code and the directory structure
output
this is my first website . i have made a basic website which displays image of my smaller projects and a hypertext to take you to those projects. the image was appearing when I ran it on vs-code but not when i hosted it live using github.


Solution

  • Your Images paths are wrong

    Please add these images path to display the image. It will work. use src="./assets/images/movie-ranking.png" instead of src="/assets/images/movie-ranking.png", see mentioned code below

    <img src="./assets/images/movie-ranking.png" alt="picture of my movie ranking">
    
    <img src="./assets/images/birthday-invite.png" alt="picture of my birthday invite project">