Inject svg images in html which makes images dynamic and allows them to be processed dynamically like html elements with CSS/JS.
import prosvg from 'prosvg'
prosvg({
url: '/test.svg', // String: SVG path
el: '#svg-1', // String | HTML element: Element in which svg to be injected
stroke: 'white', // String: SVG stroke color
fill: 'black', // String: SVG fill color
cacheKill: true, // Boolean: Append query string in svg url to avoid CORS issues (default: true)
save: true // Boolean: Cache assets once fetched (default: true)
})
Size of injected SVG will be equal to the parent div
size.