Using an SVG for the site's main logo

(Michael Howell) #1

@ArloJamesBarnes @codinghorror

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

(Jeff Atwood) #2

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.

(Michael Howell) #3

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

(Jeff Atwood) #4

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.

(Arlo James Barnes) #5

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.