benhowdle89/svgeezy

Should This Work the Opposite Way?

Closed this issue · 3 comments

Rather than check for SVG support and provide a bitmap fallback if it doesn't exist, shouldn't SVGeezy provide an SVG replacement if support does exist? If a browser a) doesn't support SVG, and b) has JS disabled, then no image will render. Using a bitmap as the default src and upgrading to an SVG ensures all browsers get an image regardless.

👍 I agree

@kgrote @wrightmartin this is very true, and certainly one way to look at it.

HOWEVER. The reason for this design choice was one based on stats, a la: http://caniuse.com/svg. We can see that SVG has 87% support across browsers, so personally, I'd rather cater for the 87% of browsers, and then if the browser doesn't support SVG, they download an extra image.

A solution for the disabled JS is to put a normal pointing to a standard image format into a which won't be downloaded for users on modern browsers.

That makes sense. It's a shame there's not a way to take a progressive enhancement approach which doesn't result in 87% of browsers downloading two images.

Great work, by the way 🍰