It is a good practice to use an empty alt attribute for images that don't need or don't have a text description. This is done by setting an empty alt attribute :
<img alt=""...
However in thymealf, when using a dynamic alt text that resolves to something null or empty, the attribute is removed altogether :
<img th:alt="${media.altText}"...
Is there an elegant way to solve this issue ?