Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

213
Visualizações
HTML error when attempting to use image in the same folder

Let's say I have a folder Block with the following files within...

Block
   index.js
   Block.js
   Block.scss
   Block_Image.png

Within the Block.js file, I attempt to grab and display the image with...

<img src="Block_Image.png alt='Picture of block' />

Why do I get a 404 Not Found error when running it? Only the alt text appears where the image should be. I have tried using different file paths, and I get the same error every time. Thanks for the help!

about 4 years ago · Juan Pablo Isaza
3 Respostas
Responde à pergunta

0

Hit F12 and check if something is blocking. If not. I would try to inspect and open image src in new tab, that will help us identifying the issues with the image url.

about 4 years ago · Juan Pablo Isaza Relatório

0

have you tried using "Block/Block_Image.png" ? If the html is on one level up, then it will look up in that folder.

about 4 years ago · Juan Pablo Isaza Relatório

0

In your code it seems your forgot an ".
If you didn't, try this :

<img src="./Block_Image.png" alt='Picture of block' />
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda