From f22a563116be7998f430b6ee4a8b68874ec4643c Mon Sep 17 00:00:00 2001 From: Lennart Weller Date: Tue, 18 Jun 2019 14:57:58 +0000 Subject: Add SVG image detection based on file extension Add simple SVG image detecetion base on the file extension .svg. This fixes the SVG being delivered as binary/octet-stream and makes it possible to embedd the SVG. Signed-off-by: Lennart Weller --- lib/utils.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/utils.js b/lib/utils.js index 247f85f2..1725f6e8 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -21,6 +21,8 @@ exports.getImageMimeType = function getImageMimeType (imagePath) { return 'image/png' case 'tiff': return 'image/tiff' + case 'svg': + return 'image/svg+xml' default: return undefined } -- cgit v1.2.3