Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem
If you use the same image more than one time in swiftmailer theme using the image:$path format, file gets embedded multiple times. This causes message to be larger than it should be. Some e-mail readers treat additional embedded images as attachments as they are never used in the message body.
Steps to reproduce
- Cretate mail template with 2 or more
<img>
tags using the image:$path format and the same $path. - Send mail :)
Proposed resolution
I've created simple fix for the issue, see patch attached. Works for me.
Remaining tasks
I've not created any tests for that so fix needs review/testing.
Comment | File | Size | Author |
---|---|---|---|
#4 | 2176873-4.patch | 1.12 KB | webflo |
| |||
swiftmailer-inline-images.patch | 1.65 KB | mwysinski | |
Comments
Comment #1
sbrattla CreditAttribution: sbrattla commentedThanks, indeed a good point I haven't really put any thought into. I'll try to get your fix applied very soon.
Comment #2
mwysinski CreditAttribution: mwysinski commentedThank you.
If you want I can help you with maintaining this module. I'm quite experienced in building mime mails in php and I'm thinking of getting more engaged in the drupal community.
Let me know what you think about it.
Comment #3
sbrattla CreditAttribution: sbrattla commentedApplied and commited. Thanks!
Sorry for my huge delay in getting back to you. Are you still interested in becoming a maintainer?
Comment #4
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedComment #5
webflo CreditAttribution: webflo at UEBERBIT GmbH commented