iconfu / svg-inject

A tiny, intuitive, robust, caching solution for injecting SVG files inline into the DOM.
MIT License
800 stars 85 forks source link

most basic example isnt working #42

Closed sandgupta23 closed 4 years ago

sandgupta23 commented 4 years ago

Pls find my code here. Its not working. I dont know what am I missing. Can you pls provide a working demo?

Code: <img src="https://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg" onload="SVGInject(this)" />

Expectation: In chrome Elements panel above image should be replaced by svg

Reality: No change is seen in above image.

dasboe commented 4 years ago

It seems you're not including the SVGInject Script in your JSFiddle. Have a look here for installation instruction: https://github.com/iconfu/svg-inject#how-to-install-svginject