Embed images using MailAttachmentsManager.getImageUrl in JETI Velocity Template?

Monika Danielsson November 16, 2015

Would it be possible to be able to use the MailAttachmentsManager.getImageUrl in Velocity Templates parsed by JETI, to get inline images, instead of packing the whole base64 string into the img src string?

I tried using the same line as in the footer.vm (used by normal Jira mail) and the result in the JETI mail was that the link was made into an external link (which should be the result if getImageUrl fails, according to its doc).

 <img id="footer-pattern-logo-desktop" src="$attachmentsManager.getImageUrl("/images/mail/footer-desktop-logo.png")" alt="Atlassian logo" title="Atlassian logo" width="169" height="36" class="image_fix"  />

When I instead use <img src="data:image(png:base64,....">, I get the image, but the Velocity template is much less obvious and much more cluttered; it's very much not obvious what image is actually added. 

I might of course have missed something in how I added the link, or what the path should be; if I have, please tell me. 

 

1 answer

0 votes
Monika Danielsson November 16, 2015

(I use Velocity files saved on the server, to be able to include the same parts in several different email templates, if that makes any difference.)

Suggest an answer

Log in or Sign up to answer