svg size code example
Example 1: bootstrap 4 auto resize svg image
<img src="monkey.svg" alt="Monkey face" style="width: 100%; height: auto;">
Example 2: svg auto size
// Javascript to run after document load
var svg = document.getElementsByTagName("svg")[0];
var bbox = svg.getBBox();
svg.setAttribute("width", bbox.width + "px");
svg.setAttribute("height", bbox.height + "px");
svg.setAttribute("viewBox", `${bbox.x} ${bbox.y} ${bbox.width} ${bbox.height}`);