Using an SVG for the site's main logo

@ArloJamesBarnes @codinghorror

Can’t you set an SVG logo for the main logo url and use a PNG for digest logo url?


Possibly, but I think the current code substitutes whatever is there, and if the site owner forgets to provide a special email logo … email does not “do” SVG, at all.


Yeah, the digest logo url, if left blank, defaults to the logo url. So you have to make sure you do it right.

1 Like

I don’t think the benefits of SVG are all that compelling for logos, personally. If you optimize the PNG it’ll be maybe 2x-3x larger at best and that’s way offset by the fact that PNG works in 100% of scenarios, forever, whereas SVG is more like 75% at best. There are a lot of places where a SVG will be completely busted, and a PNG would have worked flawlessly, every time.

Basically it is a pointless micro-optimization, with some pretty severe downsides.

Remember that many CDNs can’t deal with SVGs either. Another bummer.


Size is not the only reason to prefer SVG where possible/appropriate* — it is also easier to make semantic, and lends itself to reuse. Of course, one has to deal with the world as it is rather than as it should be, so it is completely acceptable to choose PNG to increase compatibility…but the SVG-problematic platforms/applications should be considered buggy in that respect, not featureful.

*obviously some images are raster-y, not areas of colour or gradients. Logos are usually vector-/vexel-y, though.