From the course: Creating Web Icons with SVG

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Add backwards compatibility with SVGeezy

Add backwards compatibility with SVGeezy

From the course: Creating Web Icons with SVG

Start my 1-month free trial

Add backwards compatibility with SVGeezy

- [Voiceover] Treating SVGs like regular images by placing them inside an image element is by far the easiest method for displaying SVGs on the web. However, like I mentioned in the previous movie, this method has a problem when I comes to older browsers that do not support SVGs. In those older browsers, in place of an SVG, you'll just see a little red X indicating there's an image here that is not being displayed. So, to support these older browsers, we need to figure out a way of swapping out this SVG for some other supported image format, like a PNG, in those older browsers. The simplest solution to this problem is a JavaScript plug-in called SVGeezy that you can download directly from GitHub. All you need here is this one file, SVGeezy.min.js, and you initialize it, and pass a couple of instructions on how you want it to use. Here you can either use a specific class to tell SVGeezy to ignore certain images. In this example that cause no check, or you can simply set that property…

Contents