Search code examples
imagegithubgithub-pages

Images not loading in Github Page


I pushed my rock-paper-scissor game on github just now and the images on the media folder is not loading.

Here is the link to the repository: https://github.com/jove0610/Rock-Paper-Scissors

I tried going to the images manually and it loads fine..

https://jove0610.github.io/Rock-Paper-Scissors/media/rock.jpg

https://jove0610.github.io/Rock-Paper-Scissors/media/paper.jpg

https://jove0610.github.io/Rock-Paper-Scissors/media/scissors.jpg

Here is the code:

<div id="chooseItemBox">
   <input id="rockButton" type="image" src="/media/rock.jpg" />
   <input id="paperButton" type="image" src="/media/paper.jpg" />
   <input id="scissorsButton" type="image" src="/media/scissors.jpg" />
</div>

I tried googling stuff and it seems the common problem is sometimes the file has uppercases, but that's not the case with me...


Solution

  • nevermind I got it done now... it looks like I have to write "media/rock.jpg" in the source instead of "/media/rock.jpg"