From 9a5bb439ec9f6ab5d2fce7567452ca310736d688 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Thu, 26 Nov 2015 22:55:26 -0500 Subject: [PATCH] GIF support for avatars --- discord/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/discord/utils.py b/discord/utils.py index 423ddc8ae..74f360702 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -71,5 +71,7 @@ def _get_mime_type_for_image(data): return 'image/png' elif data.startswith(b'\xFF\xD8') and data.endswith(b'\xFF\xD9'): return 'image/jpeg' + elif data.startswith(b'GIF89a') or data.startswith(b'GIF87a'): + return 'image/gif' else: raise InvalidArgument('Unsupported image type given')