summaryrefslogtreecommitdiffstats
path: root/ckeditor/image/pillow_backend.py
diff options
context:
space:
mode:
Diffstat (limited to 'ckeditor/image/pillow_backend.py')
-rw-r--r--ckeditor/image/pillow_backend.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ckeditor/image/pillow_backend.py b/ckeditor/image/pillow_backend.py
index 74db2af..a888c5c 100644
--- a/ckeditor/image/pillow_backend.py
+++ b/ckeditor/image/pillow_backend.py
@@ -24,7 +24,10 @@ def image_verify(f):
def create_thumbnail(file_path):
thumbnail_filename = utils.get_thumb_filename(file_path)
- thumbnail_format = utils.get_image_format(os.path.splitext(file_path)[1])
+ try:
+ thumbnail_format = utils.get_image_format(os.path.splitext(file_path)[1])
+ except KeyError:
+ thumbnail_format = 'image/jpeg'
file_format = thumbnail_format.split('/')[1]
image = default_storage.open(file_path)