So, I am trying to make a shop section and I cannot find a way to display an alt image in case my image doesn't exist.
Basically I use the Model to pass a List then with th:each I manage to make a card for each product. All images are called after the id of the product
Do you know what I am doing wrong?
<img th:if="(@{'static/products/' + ${product.id} + '.png') != null" th:src="@{'static/products/' + ${product.id} + '.png'}" class="card-img-top" alt="immagine_vinile">
doesn't seem to work being a @{} and not a ${}.
I apologize if my terms are not right but I am learning