0

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

Sukhjeevan
  • 3,074
  • 9
  • 46
  • 89
  • Awesome...I was looking for exactly that kind of – Sukhjeevan May 12 '17 at 14:43
  • the only concern here is that it's executing client side so this might have little impact on page load response time...Can we do the same in server side through any C#.net API / plugin or any other approach...otherwise we are good this one... – Sukhjeevan May 12 '17 at 18:33

0 Answers0