How to use images in custom content blocks

In the mailtemplate we want to use we have the need for a custom header which also contains 2 images.

I can fairly easily create a custom HTML content block that can be re-used in multiple templates but I am stuck when trying to use images that are preferably also send along in the mail.

The img tag in my message should contains a src attribute but I have no idea where to point it to ? Should I upload an attachment to the content block ? But even then I cannot point to that ?

The documentation does not seem to mention anything about this.

File attachments

Like

3 comments

Dear Ronald,

If you want to add a picture within html block, you use the HTML <img> element to define an image and src attribute to define the URL of the image. For example, you can share your picture on the web and set the url in the src attribute. For example, I have put a link to the pic on our website: <img src="https://www.bpmonline.com/sites/all/themes/ts_bootstrap_subtheme/img_co…" alt="Mountain View" style="width:304px;height:228px;">

Regards,

Lily

Dear Lily,

  that is obviously a solution too, but the behaviour seems to be quite different in combination with Elasticmail:

- in case of using an external URL this URL is not modified in the sending (ie. the src attribute is unchanged)

- when using a BPM online URL (in the form src="../rest/FileService/GetFile/149d2eaf-cbd2-49fa-b565-637748ff823c/19f56df7-7e57-436e-a04a-883dbba9fc59" ) then elasticmail will tranform this into a different source pointing to api.elasticmail.com/userfile/f7d3e732-61f2-4400-9799-58a1f3583b4d/7fea221b0a593610361033bc6d0e05e0 

For sure there is a difference in behaviour but I don't know if one is better than the other ...

Dear Ronald,

I agree that there is a difference in behavior but you can do in any of these two ways. The actual result is the same so that it doens't matter how to insert the url. You can do it in the way that is more conveninet for you to reach your business goal.

Best regards,

Lily

Show all comments