This commit is contained in:
Martin Quarda 2024-10-07 06:10:40 +02:00
parent 07d7c6511c
commit 66177139ef

View File

@ -200,7 +200,7 @@ def photos(request):
img = PIL.Image.open(file)
rtn.append({
'original': '/' + file.replace(".jpg", ".webp"),
'thumbnail': '/' + file.replace('photos/', 'photos/thumbnail/').replace(".jpg", ".webp"),
'thumbnail': '/' + file.replace(f'photos/{i}/', f'photos/{i}/thumbnail/').replace(".jpg", ".webp"),
'original_width': img.width,
'original_height': img.height,
})