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

107
Visualizações
Insert image using html

I have an image located in here D:\clone4\java-security-service\src\main\resources\images and I want to add it to my html page, but it doesn't seem to work. I tried many ways like:

<img style="max-width: 170px;" src="./images/piechart.jpg" alt="pie-chart"> 

but I get nothing. My Html file is located inside a java project. I'm open to suggestions.

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

0

Use Absolute path, not the Relative one. So give the whole path since both locations of HTML file and image are from different folders. Give src attribute: D:\clone4\...\images But Try using forward slashes instead of backslashes and prepend with file://, So the link would be like

C:/clone4/.../images/piechart.jpg

about 4 years ago · Juan Pablo Isaza Relatório

0

Open the image in your web browser. Then copy the path and add it to attribute src of img src location looks like this file:///D:/clone4/.../images/piechart.jpg

about 4 years ago · Juan Pablo Isaza Relatório

0

src="./images/piechart.jpg"

Try moving the jpg into the same folder where html file located. Then remove the path and put is as just

src="piechart.jpg"
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