We are using <img>
tag to display svg images right now
<div class="info-vis-img">
<img alt="infovisual-mobile-printing-1" src="/-/media/Infovisual/infovisual-mobile-printing-1.svg" class="text-center">
</div>
but now we don't wanna use <img>
tag to display svg images instead we want to extract svg tag from svg image and will place extracted svg tag inside <div>
tag as shown below.
<div class="info-vis-img">
<div class="svg-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="449.1 991.8 33.6 33.6">
<path d="M482.7 1007.8h-16v-16h-1.6v16h-16v1.6h16v16h1.6v-16h16v-1.6z"/>
</svg>
</div>
</div>
How can we achieve this. Is there any plugin or API available which take svg image path as an input parameter and return <svg>
tag
Thanks