diff --git a/viewer/utils.py b/viewer/utils.py index e09faf8..40c6cdc 100644 --- a/viewer/utils.py +++ b/viewer/utils.py @@ -30,6 +30,9 @@ def make_thumbnail(image): thumb_path.parent.mkdir(parents = True, exist_ok = True) if not thumb_path.exists(): - with Image.open(str(image)) as pilimg: - pilimg.thumbnail(THUMB_SIZE) - pilimg.save(str(thumb_path)) + try: + with Image.open(str(image)) as pilimg: + pilimg.thumbnail(THUMB_SIZE) + pilimg.save(str(thumb_path)) + except: + pass