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:
parent
8612740f82
commit
f22a563116
1 changed files with 2 additions and 0 deletions
|
@ -21,6 +21,8 @@ exports.getImageMimeType = function getImageMimeType (imagePath) {
|
||||||
return 'image/png'
|
return 'image/png'
|
||||||
case 'tiff':
|
case 'tiff':
|
||||||
return 'image/tiff'
|
return 'image/tiff'
|
||||||
|
case 'svg':
|
||||||
|
return 'image/svg+xml'
|
||||||
default:
|
default:
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue