Fails on lowercase `viewbox` property
fregante opened this issue · comments
Federico Brigante commented
While technically not a full SVG, browsers can still read this, but it fails in image-size
var imageSize = require("image-size")
imageSize(Buffer.from('<svg viewbox="0 0 10 10"></svg>', 'utf8'))
// -> TypeError: Invalid SVG
var imageSize = require("image-size")
imageSize(Buffer.from('<svg viewBox="0 0 10 10"></svg>', 'utf8'))
// -> Object {height: 10, width: 10, type: "svg"}
Tested on https://npm.runkit.com/image-size