Skip to content

Commit

Permalink
Use fullsize for tiff, jp2 in lightgallery
Browse files Browse the repository at this point in the history
  • Loading branch information
zerocrates committed Jun 6, 2024
1 parent 21460a6 commit 9750a31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/views/helpers/LightGallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public function lightGallery($files)
} else if ($mediaType == 'application/pdf') {
$attributes['data-iframe'] = 'true';
$attributes['data-src'] = $source;
} else if ($mediaType == 'image/tiff' || $mediaType == 'image/jp2') {
$attributes['data-src'] = record_image_url($file, 'fullsize');
} else {
$attributes['data-src'] = $source;
}
Expand Down Expand Up @@ -117,7 +119,7 @@ protected function _displayFileList($files)
protected function _prepareFiles($files)
{
$sortedFiles = ['gallery' => [], 'other' => []];
$whitelist = ['image/bmp', 'image/gif', 'image/jpeg', 'image/png', 'image/svg+xml', 'audio/mp3', 'audio/mpeg', 'audio/mpeg3', 'audio/aac', 'audio/mp4', 'audio/ogg', 'video/mp4', 'video/x-m4v', 'video/ogg', 'video/webm', 'video/quicktime', 'application/pdf'];
$whitelist = ['image/bmp', 'image/gif', 'image/jp2', 'image/jpeg', 'image/png', 'image/svg+xml', 'image/tiff', 'audio/mp3', 'audio/mpeg', 'audio/mpeg3', 'audio/aac', 'audio/mp4', 'audio/ogg', 'video/mp4', 'video/x-m4v', 'video/ogg', 'video/webm', 'video/quicktime', 'application/pdf'];
$html5videos = [];

$index = 0;
Expand Down

0 comments on commit 9750a31

Please sign in to comment.