Skip to content
Allows for automatic Image fallbacks for browsers that can't handle SVGs
Pull request Compare This branch is 33 commits behind benhowdle89:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
readme.md
svgeezy.js

readme.md

SVGeezy

A JavaScript plugin to handle your images in browsers that don't support SVGs

SVGeezy is in essence, a fallback plugin. It allows you to use SVGs for all your assets, giving you complete resolution independence.

It checks if the browser supports SVGs, if not, changes the src of the image to a .png instead (or whatever you pass in).

Use

svgeezy.init('nocheck', 'png');

The first parameter is a class to tell the code not to check. This may be because you have no fallbacks for certain SVGs.

The second is a filetype, this can be anything you want, just make sure the file path resolves to an image. ie. '/images/logo.svg', will be replaced with '/images/logo.png'.

Something went wrong with that request. Please try again.