Search code examples
htmlcssgithubgithub-pages

Why my images are not displaying in my Git Hub Pages?


I`ve just built this github pages however for some reason my images are not being loading with the page.

Here is the link of my site

And here is my repo

Notice that I put all my images inside a doc called "_imagens", and I correctly call it in my.

Anyway here is where I call my images

On the first page:

/*Configuracoes da imagem de fundo*/
body {
    background-image: linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0.5)) ,url("_imagens/fundo.jpg");    
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;

    height: 100vh;

    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;

}

On second page:

<header id="cabecalho">
            <img src="_imagens/poli.png" width="75px"  id="poli">
            <h1>
                Notas Poli
            </h1>
            <img src="_imagens/chapeu.png" width="75px" id="chapeu">
        </header>

They did work fine in my computer, so I think that is something that I did on github, but I don't know what could have been.


Solution

  • I mentioned before using a relative path, so try:

    <img src="./_imagens/chapeu.png" width="75px" id="chapeu">
    

    Or

    <img src="./projeto poli junior/_imagens/chapeu.png" width="75px" id="chapeu">