Inline SVG imag ereplacement
if (!Modernizr.svg) { /*if svg is not supported change the src to a supported media type*/ $('img[src$=".svg"]').each(function() { $(this).attr('src', $(this).attr('src').replace('.svg', '.png')); }); }