This commit is contained in:
Martin Quarda 2024-05-08 11:21:50 +02:00
parent 0a043b87ad
commit 97a634204f

View File

@ -64,13 +64,13 @@ def results(request):
def photos(request): def photos(request):
files = glob.glob("photos/*.webp") files = glob.glob("photos/*.jpg")
rtn = [] rtn = []
for file in files: for file in files:
img = PIL.Image.open(file) img = PIL.Image.open(file)
rtn.append({ rtn.append({
'original': '/' + file, 'original': '/' + file.replace(".jpg", ".webp"),
'thumbnail': '/' + file.replace('photos/', 'photos/thumbnail/'), 'thumbnail': '/' + file.replace('photos/', 'photos/thumbnail/').replace(".jpg", ".webp"),
'original_width': img.width, 'original_width': img.width,
'original_height': img.height, 'original_height': img.height,
}) })