Commit 8cfedbb1 authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch 'fix/thumbnail-same-size' into 'master'

Fix thumbnailing of images to same size as source

Closes #873

See merge request !1265
parents 44979b0b a2af8995
......@@ -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