Hi
Can someone please provide some pointers on embedding panel images in email alerts? Grafana 9.3.2 self hosted FOSS.
I have image renderer plugin installed and working. Using the default template, the image is inserted into the email alert body as expected. When using custom templates, I can’t work out the syntax to embed the image. The image is still rendered (capture = true) in grafana.ini, but the image is only sent with the alert as an attachment.
Looking at the ng_alert_notification.html file, it appears I need to use
{{ if ne .EmbeddedImage "" }}
<img src="cid:{{.EmbeddedImage}}" />
{{ end }}
however, using this breaks the alert output (just the grafana logo, no image, or no values from template file which works fine when the {{embeddedImage}} code is removed. The template editor doesn’t fail when saving the template.
I have read through the templating docs and use image in notifications doc, but can’t find anything about how to embed in a custom template. Use images in notifications | Grafana documentation
Any help with this would be greatly appreciated
Tim