forked from Public/pics
Add double-density thumbnails to albums and photo pages
This commit is contained in:
@@ -90,8 +90,14 @@ class PhotosIndex extends SubTemplate
|
||||
<a class="edit" href="', BASEURL, '/editasset/?id=', $image->getId(), '">Edit</a>';
|
||||
|
||||
echo '
|
||||
<a href="', $image->getPageUrl(), $this->url_suffix, '">
|
||||
<img src="', $image->getThumbnailUrl($width, $height, $crop, $fit), '" alt="" title="', $image->getTitle(), '">';
|
||||
<a href="', $image->getPageUrl(), $this->url_suffix, '#photo_frame">
|
||||
<img src="', $image->getThumbnailUrl($width, $height, $crop, $fit), '"';
|
||||
|
||||
// Can we offer double-density thumbs?
|
||||
if ($image->width() >= $width * 2 && $image->height() >= $height * 2)
|
||||
echo ' srcset="', $image->getThumbnailUrl($width * 2, $height * 2, $crop, $fit), ' 2x"';
|
||||
|
||||
echo ' alt="" title="', $image->getTitle(), '">';
|
||||
|
||||
if ($this->show_labels)
|
||||
echo '
|
||||
|
||||
Reference in New Issue
Block a user