title: Spring Boot Thymeleaf render image as base64 string
body: <p>I am trying to make an email template which contains a QR code as an image, for that I am creating a base64 encoded string for the qr code image but when I am sending that image in email it is not showing there.
      In the email template I am accessing the base64 string as</p>
  
  <pre><code>&lt;img th:attr="src=${base64Data}"
  </code></pre>
  
  <p>And the template engine is creating the html as follows:</p>
  
  <pre><code>&lt;body&gt;&lt;img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsAQAAAABRBrPYAAABjElEQVR42u3aTW6DMBAF4EFZsOQIPgpHS47GUTgCyywQ7vxhoJA0xlRVpedFROHrhnGex24pfjIGAgMDAwP7G/YkG41c8M890W3yezewYqbXsW/kkx8FvjNZfZ5gFzB5523f2M2OyyHsIXUBu5bRnSd5HcF+gWlstJYhYJexVYYsk/xt1IB9ztIKqC9fZ/vbhRIsh60GP73z7fqHNg8sg2kVOJmtf+MqUD1WcZ8hYKdYHKUr7sJAS1ZXc5iAFTMZEh02ybvAv6gs7L8LYPlMqvCgoNEhu4+hHm2X14BdwSrriknmtmWIpcp2BQQ7yTxDrAqthHZlF7tigZ1gab2bVh2HlgOsmNmWmQPZX/48t+X5DayU6cK37J39ANNmO9gFzIeXw9s2XhOPNylgWSy9/LltG/zkJwyHW2ywPLY5dU99xdzRgZUyzxCrQqpLu22PwQrZnCHku49vJz9ghSydumun8WqSg2UyzxD1ugLSwd4Z7CRb2jY/T4vRjt9f/VkfLIPh/2rAwMDA/jH7As7v6+Mxo5RFAAAAAElFTkSuQmCC" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>But when I receive the email it does not show the image.If I add an alt attribute to the image then the alt text is visible but the src attribute is missing from the img tag in the email.</p>