add webp to known image formats

This commit is contained in:
raphael 2019-07-01 10:52:39 +02:00
parent 53c93df9e3
commit b9db9ab58b

View File

@ -333,7 +333,7 @@ function uploadImgAndAddToWhiteboard(base64data) {
// verify if filename refers to an image // verify if filename refers to an image
function isImageFileName(filename) { function isImageFileName(filename) {
var extension = filename.split(".")[filename.split(".").length - 1]; var extension = filename.split(".")[filename.split(".").length - 1];
var known_extensions = ["png", "jpg", "jpeg", "gif", "tiff", "bmp"]; var known_extensions = ["png", "jpg", "jpeg", "gif", "tiff", "bmp", "webp"];
return known_extensions.includes(extension.toLowerCase()); return known_extensions.includes(extension.toLowerCase());
} }