diff --git a/src/svg-renderer.js b/src/svg-renderer.js
index <HASH>..<HASH> 100644
--- a/src/svg-renderer.js
+++ b/src/svg-renderer.js
@@ -72,6 +72,12 @@ class SvgRenderer {
         // New svg string invalidates the cached image
         this._cachedImage = null;
 
+        // Add root svg namespace if it does not exist.
+        const svgAttrs = svgString.match(/<svg [^>]*>/);
+        if (svgAttrs && svgAttrs[0].indexOf('xmlns=') === -1) {
+            svgString = svgString.replace('<svg ', '<svg xmlns="http://www.w3.org/2000/svg" ');
+        }
+
         // Parse string into SVG XML.
         const parser = new DOMParser();
         this._svgDom = parser.parseFromString(svgString, 'text/xml');
ensure svg xmlns is defined so getBBox is available

getBBox is provided by SVGGraphicsElement. For the SVG tag to be a
SVGSVGElement that subclasses SVGGraphicsElement and have a getBBox
method to determine the measurements of the svg, the svg tag must have
its xmlns attribute set to the svg spec.