diff --git a/public/css/default.css b/public/css/default.css index 8e85c9c3..3c60ef96 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -180,6 +180,7 @@ i.space-invader.alt-7::before { width: 31%; } .tiled_grid div img { + background: url('../images/nothumb.svg') center no-repeat; border: none; width: 100%; } diff --git a/public/images/nothumb.png b/public/images/nothumb.png deleted file mode 100644 index ce6a2f2d..00000000 Binary files a/public/images/nothumb.png and /dev/null differ diff --git a/public/images/nothumb.svg b/public/images/nothumb.svg new file mode 100644 index 00000000..339274a2 --- /dev/null +++ b/public/images/nothumb.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/templates/AlbumIndex.php b/templates/AlbumIndex.php index 56635a45..3205b81b 100644 --- a/templates/AlbumIndex.php +++ b/templates/AlbumIndex.php @@ -55,11 +55,12 @@ class AlbumIndex extends Template echo ' '; + ' alt="" style="width: ', static::TILE_WIDTH, + 'px; height: ', static::TILE_HEIGHT, 'px">'; } else echo ' - '; + '; if ($this->show_labels) echo ' diff --git a/templates/PhotosIndex.php b/templates/PhotosIndex.php index 7fbdf552..29fa06a7 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(), '" style="aspect-ratio: ', $image->ratio(), '">'; + echo ' alt="" title="', $image->getTitle(), '" style="width: ', $width, 'px; height: ', $height, 'px">'; if ($this->show_labels) echo '