From f7e349cea49731b0e57cc2a2c1eb4904f1aea9b9 Mon Sep 17 00:00:00 2001 From: LoganBooker Date: Wed, 8 May 2024 21:23:18 +1000 Subject: [PATCH] Add AVIF MIME type support to mimetype definitions AVIF images will open, rather than download, as the default behaviour. --- modules/ui.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ui.py b/modules/ui.py index 403425f29..cface5002 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -41,6 +41,7 @@ mimetypes.add_type('application/javascript', '.js') # Likewise, add explicit content-type header for certain missing image types mimetypes.add_type('image/webp', '.webp') +mimetypes.add_type('image/avif', '.avif') if not cmd_opts.share and not cmd_opts.listen: # fix gradio phoning home