Page MenuHomePhabricator

Notification emails should embed icons as data URIs
Closed, DeclinedPublic


The 'talk' icon in Echo talk-page notification emails is loaded via HTTP:

<img src="" alt="" height="30" width="30"></td>

Because the image is loaded remotely, many mail readers (including Gmail) won't show it by default, and it'll trigger a prompt to display remote images which must be clicked on before you can see the icon.

I would recommend embedding the icons as data URIs if possible, so they don't have to be loaded remotely. (Hopefully this isn't a compat issue...)

Version: unspecified
Severity: normal


Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:58 AM
bzimport added a project: Notifications.
bzimport set Reference to bz53479.
bzimport added a subscriber: Unknown Object (MLST).

bsitu wrote:

Thanks Brion, that's a good idea, but it looks like Gmail and Hotmail do not support data uri, it shows the text 'inline image' instead of an image


Is there an alternate way to bundle images with the email, or shall I just close this out as WONTFIX?

bsitu wrote:

We could include the images as attachment, the drawback is that some clients list all of the attached files inside the email, this would give user a bad UI experience. I will see if there is any other alternatives.

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

GMail now does display our notification icons. We did have to use PNGs instead of SVGs to make that happen, but we did that a while ago.

SBisson changed the subtype of this task from "Task" to "Feature Request".Oct 16 2018, 1:06 PM
SBisson changed the subtype of this task from "Feature Request" to "Task".Oct 16 2018, 6:41 PM

Change 501651 had a related patch set uploaded (by Sbisson; owner: Sbisson):
[mediawiki/extensions/Echo@master] Email: embed icons as data uri

Change 501651 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] Email: embed icons as data uri

We've tried embedding SVGs as data-uri, both in text and base64. The markup is sane and works in browsers but gmail doesn't render them.

We're tried including the actual SVG instead of <img src="..."> and again, the markup is correct but gmail doesn't render it.

I'm going to decline this task because of technical limitations with gmail, which is the most popular email client.

Please re-open if I'm missing something or another idea comes to mind.