From e866c354626e772779a6307488b7b41f9d101399 Mon Sep 17 00:00:00 2001 From: Diego Casorran Date: Sun, 6 Aug 2023 12:25:04 +0000 Subject: add explicit content-type header for image/webp --- modules/ui.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules') diff --git a/modules/ui.py b/modules/ui.py index 1af6b4c8..4ffb9b82 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -41,6 +41,9 @@ warnings.filterwarnings("default" if opts.show_gradio_deprecation_warnings else mimetypes.init() mimetypes.add_type('application/javascript', '.js') +# Likewise, add explicit content-type header for certain missing image types +mimetypes.add_type('image/webp', '.webp') + if not cmd_opts.share and not cmd_opts.listen: # fix gradio phoning home gradio.utils.version_check = lambda: None -- cgit v1.2.1