Verified Commit a2af8995 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix thumbnailing of images to same size as source

parent 44979b0b
......@@ -87,8 +87,12 @@ def generate_thumbnail(request, request_path):
if not sig_info['fit']:
ratio = min([a / b for a, b in zip(size, image.size)])
size = tuple(int(ratio * x) for x in image.size)
thumb =, size, Image.ANTIALIAS)
if size[0] == image.size[0] and size[1] == image.size[1]:
thumb =, size, Image.ANTIALIAS)
if sig_info['visibility'] == 'private':
query = f'?sig={request.GET["sig"]}'
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