i'm making little app with uploading menu (image) using Spring-Boot Thymeleaf my upload menu is working so either list menu uploading , but the problem is when i try to display my image from static folder in netbeans to webpage just my filename is show up but my image didnt. how should it be ?
i get filedata image from listmenu that i was created before.
//this is from my list.html:
<table border='1' width='50%' height='100%'>
<tr th:each="files: ${fileName}">
<td th:text="${files}"/>
<td><img src="../static/img/ "width="100"
th:src="@{img/' + files + '}"/></td>
</tr>
i expect the ouput at webpage is my filename(from image) and image show up.
Your th:src seams to be wrong. It should be
<img th:src="@{'/img/'+ ${files}}">
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.