Reputation: 853
How to add an image from the templates / image / valyaev.png folder to thymeleaf, use several options, but the image itself does not appear, only the outline of the image or just a tick appears
I can add it using addInline, but I cannot perform any operations on the image, so I want to add through thymeleaf itself
Upvotes: 2
Views: 9531
Reputation: 30
Sometimes thymeleaf does not take static image path ,in that case use base 64 of that image.
<img th:src="@{data:image/png;base64,YOUR IMAGE BASE 64}
Upvotes: 2
Reputation: 374
Why don't you copy it in the path static/images and then use the following statement:
<img
th:src="@{/images/valayev.jpg}"
Upvotes: 2