Email notifications sent to gmail accounts are not displaying the Vikunja logo #42

Closed
opened 2025-11-01 20:45:12 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @valantur on GitHub (Mar 30, 2022).

Every time an image is referenced via html code, Google forces it Gmail users to load that image through their web caching service.
As it turns out, Google doesn't support svg files, which is what Vikunja uses in the notification email (images/logo-full.svg).
Therefore, all notifications sent to gmail users have the image broken and it looks like this:

Vikunja broken logo

A quick fix would be to convert the images that are meant to be displayed on gmail to jpg or other compatible format, more info here: https://stackoverflow.com/questions/51471607/email-thumbnail-url-changed-to-googleusercontent-com-in-gmail

Can you please look into this and consider a fix in a future release of Vikunja?

Thanks!

Originally created by @valantur on GitHub (Mar 30, 2022). Every time an image is referenced via html code, Google forces it Gmail users to load that image through their web caching service. As it turns out, Google doesn't support svg files, which is what Vikunja uses in the notification email (images/logo-full.svg). Therefore, all notifications sent to gmail users have the image broken and it looks like this: <img width="452" alt="Vikunja broken logo" src="https://user-images.githubusercontent.com/2516392/160740531-18a825a9-2927-4d93-b949-dfa1ca70e2f4.png"> A quick fix would be to convert the images that are meant to be displayed on gmail to jpg or other compatible format, more info here: https://stackoverflow.com/questions/51471607/email-thumbnail-url-changed-to-googleusercontent-com-in-gmail Can you please look into this and consider a fix in a future release of Vikunja? Thanks!
Author
Owner

@kolaente commented on GitHub (Mar 30, 2022):

Do you know if Gmail supports inline svgs? That way we could just inline the logo and wouldn't need to work around the ux-issues of a multi billion dollar company.

The logo is loaded from the frontend not from the api but the api handles everything email related. Including the logo in another format in the frontend would require a change there (even though a little) and I'd like to avoid shipping a png with every frontend build just to use it in an email.

@kolaente commented on GitHub (Mar 30, 2022): Do you know if Gmail supports inline svgs? That way we could just inline the logo and wouldn't need to work around the ux-issues of a multi billion dollar company. The logo is loaded from the frontend not from the api but the api handles everything email related. Including the logo in another format in the frontend would require a change there (even though a little) and I'd like to avoid shipping a png with every frontend build just to use it in an email.
Author
Owner

@valantur commented on GitHub (Mar 30, 2022):

I did some research on this and it looks like inline svgs are also blocked.
I sent a test email from Vikunja to my work account hosted on Office 365 and the logo is blocked there too (on both the web version of Outlook and the Windows desktop client).

I haven't tested inline svgs though.

@valantur commented on GitHub (Mar 30, 2022): I did some research on this and it looks like inline svgs are also blocked. I sent a test email from Vikunja to my work account hosted on Office 365 and the logo is blocked there too (on both the web version of Outlook and the Windows desktop client). I haven't tested inline svgs though.
Author
Owner

@CorneliousJD commented on GitHub (May 18, 2022):

I have a few ideas that might help.

  1. Although you want to avoid shipping a png just for this, that sounds like it would be the easiest solution and only add a few kb of space to the frontend. I would personally go this route if it was me.

  2. Allowed a user-uploaded image in their settings to be used for their e-mail notifications. Then they can upload whatever image or PNG they want. This would take more code for sure but each user could have their own customized image displayed.

  3. Allow users to set an env variable for "MAILER_LOGO_URL" that points to another URL of a file that they supply themselves. Lazy users could use imgur or something to host and link to a PNG they want to use.

  4. Host a emaillogo.png on https://vikunja.io/ that all the e-mails pull from. This will increase traffic on your server though from all users, including self-hosted that have e-mail reminders setup.

  5. Lastly, just remove the image from displaying on e-mails. Replace w/ just text, or remove that image block altogether? This would be the quickest/easiest way to avoid the broken image, but also the least exciting ;)

I hope one of these helps!
I would vote for option 1 or option 3, as those would seem easiest to implement and still result in the look/feel you were originally going for.

@CorneliousJD commented on GitHub (May 18, 2022): I have a few ideas that might help. 1. Although you want to avoid shipping a png just for this, that sounds like it would be the easiest solution and only add a few kb of space to the frontend. I would personally go this route if it was me. 2. Allowed a user-uploaded image in their settings to be used for their e-mail notifications. Then they can upload whatever image or PNG they want. This would take more code for sure but each user could have their own customized image displayed. 3. Allow users to set an env variable for "MAILER_LOGO_URL" that points to another URL of a file that they supply themselves. Lazy users could use imgur or something to host and link to a PNG they want to use. 4. Host a emaillogo.png on https://vikunja.io/ that all the e-mails pull from. This will increase traffic on your server though from all users, including self-hosted that have e-mail reminders setup. 5. Lastly, just remove the image from displaying on e-mails. Replace w/ just text, or remove that image block altogether? This would be the quickest/easiest way to avoid the broken image, but also the least exciting ;) I hope one of these helps! I would vote for option 1 or option 3, as those would seem easiest to implement and still result in the look/feel you were originally going for.
Author
Owner

@kolaente commented on GitHub (May 18, 2022):

Mhh I think 1 is the one that would be the best solution between removing the logo and having a broken logo. Maybe we should just include this in the api though as that's what sends the mails. I'll take a look.

@kolaente commented on GitHub (May 18, 2022): Mhh I think 1 is the one that would be the best solution between removing the logo and having a broken logo. Maybe we should just include this in the api though as that's what sends the mails. I'll take a look.
Author
Owner

@kolaente commented on GitHub (Jun 30, 2022):

Added in https://kolaente.dev/vikunja/api/pulls/1187 - please check with the next unstable release if it works as intended.

@kolaente commented on GitHub (Jun 30, 2022): Added in https://kolaente.dev/vikunja/api/pulls/1187 - please check with the next unstable release if it works as intended.
Author
Owner

@dpschen commented on GitHub (Apr 6, 2023):

Related: https://kolaente.dev/vikunja/api/issues/1478

@dpschen commented on GitHub (Apr 6, 2023): Related: https://kolaente.dev/vikunja/api/issues/1478
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#42