From 66177139ef5c3f70b1829c16dba8267817d81466 Mon Sep 17 00:00:00 2001 From: Martin Quarda Date: Mon, 7 Oct 2024 06:10:40 +0200 Subject: [PATCH] fix #3 --- alkatorapi/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alkatorapi/views.py b/alkatorapi/views.py index 756e359..e6ca5d9 100644 --- a/alkatorapi/views.py +++ b/alkatorapi/views.py @@ -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, })