title: Encode base64 in Freemarker template
body: <p>Is there a way to convert a byte array to base64 in a Freemarker template?  Something like:</p>
  
  <pre><code>&lt;img src="data:image/jpeg;base64,${photo.data?base64}" /&gt;
  </code></pre>
  
  <p>Thanks.</p>