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.

image

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?

maybe:

@if ($alert->transport == ‘mail’)
href=“https://host.librenms.org/device/device={{ $alert->hostname }}/”>{{ $alert->hostname }}




@else
{{ $alert->hostname }}
@endif

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.

image

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.