Skip to content

Commit

Permalink
Add SVG image detection based on file extension
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
lhw authored and Lennart Weller committed Jun 18, 2019
1 parent 8612740 commit f22a563
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f22a563

Please sign in to comment.