Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Drop mimetype workaround for WebP images (#16861)
Patryk Zawadzki42a0130e90d4
diff --git a/saleor/graphql/core/validators/file.py b/saleor/graphql/core/validators/file.pyindex de3f77d66b..35b039d60e 100644--- a/saleor/graphql/core/validators/file.py+++ b/saleor/graphql/core/validators/file.py@@ -28,10 +28,6 @@ def is_supported_image_mimetype(mimetype: str) -> bool:def is_image_url(url: str) -> bool:"""Check if file URL seems to be an image."""- if url.endswith(".webp"):- # webp is not recognized by mimetypes as image- # https://bugs.python.org/issue38902- return Truefiletype = mimetypes.guess_type(url)[0]return filetype is not None and is_image_mimetype(filetype)