Browse Source

Improve image format fallback.

refactor
Syfaro 5 months ago
parent
commit
fbac483fe7
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      src/submission.py

+ 4
- 1
src/submission.py View File

@@ -98,7 +98,10 @@ class Submission(object):
98 98
         try:
99 99
             f = self.image_filename.split('.')[-1]
100 100
         except:
101
-            f = None
101
+            if image.format:
102
+                f = image.format
103
+            else:
104
+                f = None
102 105
 
103 106
         breadcrumbs.record(message=f'Attempting to resize image with extension {f}', category='furryapp', level='info')
104 107
 

Loading…
Cancel
Save