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 <lennart.weller@hansemerkur.de>
This commit is contained in:
Lennart Weller 2019-06-18 14:57:58 +00:00 committed by Lennart Weller
parent 8612740f82
commit f22a563116

View file

@ -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
}