0
The image I want to add is in the following directory:
/src/main/resources/static/images/logo.png
And the HTML tag looks like this:
<img width="220px" height="70px" th:src="@{/static/images/logo.png}"/>
However, I get the following message when I try to access the image:
There was an Unexpected error (type=Not Found, status=404). No message available
If you need to know, my index code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<title>Empresa | Simulado </title>
<link href="/static/images/favicon.ico" rel="icon" type="image/x-icon" />
</head>
<body>
<br />
<h1 align="center">Teste</h1>
<img height="70px" width="220px" src="/static/images/logo.png" />
Ps: Favicon appears normally
The image
logo.png
is in the directorystatic/images/
?– NoobSaibot
Yes! The strange thing is that if I change the end of the source to: /Static/images/favicon.ico .
– Joao Albuquerque
I even saw this question: https://stackoverflow.com/questions/29460618/inserting-an-image-from-local-directory-in-thymeleaf-spring-framework-with-mave
– Joao Albuquerque
This error message that returns is in
Console
browser ?– NoobSaibot
No console do navegador aparece: Failed to load Resource: the server responded with a status of 404 ()
– Joao Albuquerque