We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f0b67f commit dbfe93fCopy full SHA for dbfe93f
apps/sponsors/templatetags/sponsors.py
@@ -83,9 +83,9 @@ def ideal_size(image, ideal_dimension):
83
ideal_dimension = int(ideal_dimension)
84
try:
85
w, h = image.width, image.height
86
- except (FileNotFoundError, OSError):
87
- # FileNotFoundError: local dev doesn't have all images
88
- # OSError (includes PIL.UnidentifiedImageError): SVG/EPS can't be read by PIL
+ except FileNotFoundError:
+ # local dev doesn't have all images if DB is a copy from prod environment
+ # this is just a fallback to return ideal_dimension instead
89
w, h = ideal_dimension, ideal_dimension
90
91
return int(w * math.sqrt((100 * ideal_dimension) / (w * h)))
0 commit comments