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):
files = glob.glob("photos/*.webp")
files = glob.glob("photos/*.jpg")
rtn = []
for file in files:
img = PIL.Image.open(file)
rtn.append({
'original': '/' + file,
'thumbnail': '/' + file.replace('photos/', 'photos/thumbnail/'),
'original': '/' + file.replace(".jpg", ".webp"),
'thumbnail': '/' + file.replace('photos/', 'photos/thumbnail/').replace(".jpg", ".webp"),
'original_width': img.width,
'original_height': img.height,
})