From 20d53b1081e3301d75ebc706df5e880445ac9fe9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 2 Apr 2021 16:38:18 +0530 Subject: [PATCH] Allow editing webp images in the editor --- src/calibre/gui2/tweak_book/editor/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/editor/__init__.py b/src/calibre/gui2/tweak_book/editor/__init__.py index ffc54590ca..478215e9eb 100644 --- a/src/calibre/gui2/tweak_book/editor/__init__.py +++ b/src/calibre/gui2/tweak_book/editor/__init__.py @@ -24,7 +24,7 @@ def syntax_from_mime(name, mime): if mime.startswith('text/'): return 'text' if mime.startswith('image/') and mime.partition('/')[-1].lower() in { - 'jpeg', 'jpg', 'gif', 'png'}: + 'jpeg', 'jpg', 'gif', 'png', 'webp'}: return 'raster_image' if mime.endswith('+xml'): return 'xml'