Commit d04c64ec authored by fred's avatar fred
Browse files

thumbnail: do not try resizing missing files

parent 09a4602a
......@@ -28,7 +28,7 @@ def thumbnail(image, size='100x100'):
os.path.getmtime(filename) > os.path.getmtime(miniature_filename):
# if the image wasn't already resized, resize it
if not os.path.exists(miniature_filename):
if not os.path.exists(miniature_filename) and os.path.exists(filename):
image =
if abs( (1.0*x/y) - (1.0*image.size[0]/image.size[1]) ) > 0.1:
# aspect ratio change, crop the image first
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment