Add 'no thumb' vector image for use while loading

This commit is contained in:
2023-03-11 17:16:53 +01:00
parent e6f7476037
commit 54c4294d08
5 changed files with 15 additions and 3 deletions

View File

@@ -55,11 +55,12 @@ class AlbumIndex extends Template
echo '
<img src="', $thumbs[1], '"' . (isset($thumbs[2]) ?
' srcset="' . $thumbs[2] . ' 2x"' : '') .
' alt="">';
' alt="" style="width: ', static::TILE_WIDTH,
'px; height: ', static::TILE_HEIGHT, 'px">';
}
else
echo '
<img src="', BASEURL, '/images/nothumb.png" alt="">';
<img src="', BASEURL, '/images/nothumb.svg" alt="">';
if ($this->show_labels)
echo '

View File

@@ -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 '