images: add webp hardcode to _get_mime

This commit is contained in:
Luna Mendes 2018-11-19 04:41:34 -03:00
parent 479151cdfa
commit 27c6402233
1 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,9 @@ def _get_ext(mime: str):
def _get_mime(ext: str): def _get_mime(ext: str):
if ext == 'webp':
return 'image/webp'
return mimetypes.types_map[f'.{ext}'] return mimetypes.types_map[f'.{ext}']