SVG images are not rendered in Gmail or Outlook 2013 email clients. For this reason they are not a good choice for the digest logo. Should this be mentioned in the description under the ‘digest logo url’ setting? Something like ‘SVG images have limited support across email clients.’
AI-generated summary
The discussion addresses the limited support for SVG images as digest logos in email clients like Gmail and Outlook 2013. simon initially suggested adding a warning to the settings description, but codinghorror felt this was unnecessary trivia. simon also noted a related issue where the ‘box’ category style fails in Gmail due to white-on-white text.
While sam and riking proposed adding validation to prevent users from uploading SVG files, simon argued that default logos are still affected. Instead, he suggested a fallback mechanism: if an SVG is detected, the email should display the site title instead of a broken image link. techAPJ implemented this suggestion in a commit. Additionally, simon identified a bug where the anchor tag was not closing when the logo was blank, leading DeanMarkTaylor to create a pull request to fix the HTML structure.
Possibly but svg logos would be quite rare and this feels a bit like trivia.
Aha I remember asking @techapj about that..
It’s unrelated, but also the ‘box’ category style doesn’t work in gmail. The category is there, but it’s white writing on a white background.
I also asked @techapj about that as well. We should fix the white on white badges if we can.
I would not bother mentioning, just add a regex test that disallows .svg from the site setting
The Docker forum has the same issue. There could be a test for SVG logos in digest.html.erb in the same place where you are testing if the logo is blank. If it is an SVG, display SiteSettings.title instead of a broken link.
Nice suggestion! Implemented via:
https://github.com/discourse/discourse/commit/f9d1a2554d180ac79000fe6263c7f57ea4f3f8ec
It looks like the anchor element isn’t being closed when the logo is blank.
<tr>
<td style="padding: 10px 10px; background-color: #<%= @header_color %>;">
<a href="<%= Discourse.base_url %>" style='color: #<%= @anchor_color %>'>
<%- if logo_url.blank? %>
<%= SiteSetting.title %>
<%- else %>
<img src="<%= logo_url %>" style="max-height: 35px; min-height: 35px; height: 35px;" class='site-logo'></a>
<%- end %>
</td>
</tr>
Created pull request for this issue:
https://github.com/discourse/discourse/pull/4135
That one would probably do better as a SiteSettingValidation. Prevent you from setting a .svg logo in the first place.

