in my Drupal 8 installation I’m using mailsystem module in combination with swiftmailer module. Everything works fine so far, my swiftmailer twig template inside the templates folder of my custom theme is recognized and works as it should in general.
Problem:
When I want to embed a logo inside my template (as inline image), the image can’t be loaded. It renders the template and shows a broken image placeholder. I used the code mentioned in readme.txt (see point 3.2.2) of swiftmailer module:
<img src="image:/themes/MYTHEME/logo.png">
Same error when I use
<img src="image:{{ base_url }}/themes/MYTHEME/logo.png">
Logo path is generally working, use the same for my theme in general.
The image is embedded also inside the email (using MailHog to check it):
Content-Type: image/png; name=logo.png
Content-Transfer-Encoding: base64
Content-ID: <f8a965e25fc041c5af9318b9d71cd3d1@mysite.site>
Content-Disposition: inline; filename=logo.png
.... image code following ....
How can I get my logo image inside my email correctly?
Would like to avoid simply setting a linked image it to my webserver if possible,to minimize webserver traffic.
Thanks in advance 🙂