title: Thymeleaf - Image to act as Hyperlink
body: <p>Using Thymeleaf, how can I make an image act as a hyperlink?</p>
  
  <p>The <a href="https://www.thymeleaf.org/doc/articles/standardurlsyntax.html" rel="nofollow noreferrer">Thymeleaf Documentation</a> says nothing about images and I tried using standard HTML for this issue but none of the below attempts made my image an active hyperlink.</p>
  
  <pre><code>&lt;a th:href="@{/user/myUser}"&gt;
      &lt;img src="../../static/images/image.jpg" alt="logo"/&gt;
  &lt;/a&gt;
  
  &lt;a href="https://www.w3schools.com"&gt;
      &lt;img src="../../static/images/image.jpg" alt="logo"/&gt;
  &lt;/a&gt;
  </code></pre>