How do I add an HTML image in an alert template?

Hi, I have a problem, I can not add a photo to the alert on libre, the alert goes by email, only the alternative text is displayed.


I dont know much about libre because I just installed it and have only been messing with it for a few days, but did you turn on HTML in the settings?


@if ($alert->transport == ‘mail’)
href=“{{ $alert->hostname }}/”>{{ $alert->hostname }}

{{ $alert->hostname }}

Unfortunately, this way does not work.

do you have the FQDN of your https:// host for the img source?
In your screen shot you just have /home/ and that’s nothing an external client is able to resolve.

The path to the image you used is relative to the mail client using to see the email, you’ll need to use a full http://xxxxxx url.

Also ensure html is enabled for emails

Yes. I have enabled HTML for emails.

I will try to modify this path according to your suggestion. I will let you know the result later. Thanks for your help.


You could try to base64 encode the image.
Go to PNG to Base64 (This was the first google hit), upload your image and choose “HTML img” format.
Then copy the <img ---> tag and use that.

For example (I love this collection of icons, minimalistic) go to:
Material Design Icons
Choose an icon, choose “advanced download” and “advanced png export”, choose the size and save the file. Convert it and use it in the template.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.