# SVG image as digest logo has limited support

**URL:** https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935
**Category:** UX
**Tags:** activity-summary
**Created:** [February 21, 2016, 6:32pm UTC](https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935 "2016-02-21T18:32:39Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [February 21, 2016, 6:32pm UTC](https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935/1 "2016-02-21T18:32:40Z")

</div>

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.’

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 21, 2016, 6:40pm UTC](https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935/2 "2016-02-21T18:40:01Z")

</div>

Possibly but svg logos would be quite rare and this feels a bit like trivia.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [February 21, 2016, 6:42pm UTC](https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935/3 "2016-02-21T18:42:01Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/1/0/10909e21333d585b2b49b432e12e6330048efa75.png)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 21, 2016, 6:44pm UTC](https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935/4 "2016-02-21T18:44:12Z")

</div>

Aha I remember asking @techapj about that..

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [February 21, 2016, 6:53pm UTC](https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935/5 "2016-02-21T18:53:01Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 21, 2016, 6:56pm UTC](https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935/6 "2016-02-21T18:56:02Z")

</div>

I also asked @techapj about that as well. We should fix the white on white badges if we can.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 21, 2016, 9:24pm UTC](https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935/7 "2016-02-21T21:24:44Z")

</div>

I would not bother mentioning, just add a regex test that disallows .svg from the site setting

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [March 14, 2016, 5:56am UTC](https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935/8 "2016-03-14T05:56:01Z")

</div>

It will still be a problem when sites are using their default logo:

 ![](https://global.discourse-cdn.com/meta/original/3X/0/5/05bec4af0e0a5184495747d15f01c15556913568.png)

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [March 26, 2016, 7:06pm UTC](https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935/9 "2016-03-26T19:06:01Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [April 2, 2016, 12:19pm UTC](https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935/10 "2016-04-02T12:19:04Z")

</div>

> [@simon](#):
>
> If it is an SVG, display SiteSettings.title instead of a broken link.

Nice suggestion! Implemented via:

[https://github.com/discourse/discourse/commit/f9d1a2554d180ac79000fe6263c7f57ea4f3f8ec](https://github.com/discourse/discourse/commit/f9d1a2554d180ac79000fe6263c7f57ea4f3f8ec)

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [April 2, 2016, 4:10pm UTC](https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935/11 "2016-04-02T16:10:01Z")

</div>

It looks like the anchor element isn’t being closed when the logo is blank.

```rb
<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>

```

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [April 2, 2016, 4:46pm UTC](https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935/12 "2016-04-02T16:46:15Z")

</div>

> [@simon](#):
>
> It looks like the anchor element isn’t being closed when the logo is blank.

Created pull request for this issue:  
[https://github.com/discourse/discourse/pull/4135](https://github.com/discourse/discourse/pull/4135)

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [April 9, 2016, 6:36am UTC](https://meta.discourse.org/t/svg-image-as-digest-logo-has-limited-support/39935/13 "2016-04-09T06:36:19Z")

</div>

That one would probably do better as a SiteSettingValidation. Prevent you from setting a .svg logo in the first place.
