From 2a53a54a78e191dd901b3e729d7c04263cfca535 Mon Sep 17 00:00:00 2001 From: Umputun Date: Sat, 13 Apr 2019 14:52:21 -0500 Subject: [PATCH] allow image/webp https://github.com/umputun/remark/pull/307#issuecomment-482873793 --- backend/app/store/image/image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/store/image/image.go b/backend/app/store/image/image.go index 2a3554a3..ee9151fa 100644 --- a/backend/app/store/image/image.go +++ b/backend/app/store/image/image.go @@ -132,7 +132,7 @@ func (s *Service) Close() { // check if file f is a valid image format, i.e. gif, png or jpeg func isValidImage(b []byte) bool { ct := http.DetectContentType(b) - return ct == "image/gif" || ct == "image/png" || ct == "image/jpeg" + return ct == "image/gif" || ct == "image/png" || ct == "image/jpeg" || ct == "image/webp" } // guid makes a globally unique id