I am doing a Spring Boot project where I have a folder in src/main/resources called static
and another folder called images
inside.
I´m using thymeleaf and HTML to display an image, but never shows it. I use Spring Security, that could be the problem. I tried with a lot of different paths and routes to verify if it was misspelled but that was not the case.
I use this code in the html:
<img th:src="@{img/planet.jpg}" class="img-thumbnail" style="max-width: 200px" />
And the folder structure is:
The HTML file that displays the image is "cambioPassword.html" and the image is "planet.jpg" I also can provide a link to my repository in case anyone wants to take a deep look, I would be very thankful.
I was trying to use different paths and still nothing, instead of the image I only see the default icon.