From 7d19cf823df57df92f3bb12bcd229f1f518429d8 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sat, 11 Mar 2023 17:04:30 +0100 Subject: [PATCH] Pass aspect ratio into photo thumbnails --- templates/PhotosIndex.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/PhotosIndex.php b/templates/PhotosIndex.php index 25255c5..7fbdf55 100644 --- a/templates/PhotosIndex.php +++ b/templates/PhotosIndex.php @@ -100,7 +100,7 @@ class PhotosIndex extends Template else echo ' srcset="', $image->getThumbnailUrl($image->width(), $image->height(), true), ' 2x"'; - echo ' alt="" title="', $image->getTitle(), '">'; + echo ' alt="" title="', $image->getTitle(), '" style="aspect-ratio: ', $image->ratio(), '">'; if ($this->show_labels) echo '