Open dannykopping opened 4 months ago
An image tag with src and mime doesn't work as HTML?
Could you please clarify what you're asking @kylecarbs, so I avoid misunderstanding you?
Ahh, sorry I was taking context from Slack.
Instead of linking externally to our logo, can we take the SVG content and base64 it, then toss it in an image tag?
https://stackoverflow.com/questions/6706891/embedding-image-in-html-email
I initially tried that, but it's not compatible with all email clients.
Makes sense and I figured that'd be your response
Sure thing 👍 I should've included that context in the issue. Thanks for clarifying @kylecarbs
Previously I tried to embed our logo in the SMTP email template, but it was not supported in Gmail.
Currently we link to the logo in the template. https://github.com/coder/coder/blob/main/coderd/notifications/dispatch/smtp/html.gotmpl#L11
@mafredri suggested there may be other approaches to embedding images such as CIDs. This article from SendGrid (Apr 2024) suggests that CIDs may not work in Gmail reliably, but it's worth trying - or using multiple techniques together.