Skip to content

Commit bd22fa6

Browse files
committed
show original image when there isn’t thumb image (#225)
1 parent eaa5565 commit bd22fa6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/traits/LfmHelpers.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,11 @@ public function getFilesWithInfo($path)
280280
}
281281

282282
$thumb_path = $this->getThumbPath($file_name);
283+
$image_path = $this->getCurrentPath($file_name);
283284
if (File::exists($thumb_path)) {
284285
$thumb_url = $this->getThumbUrl($file_name) . '?timestamp=' . filemtime($thumb_path);
286+
} elseif (File::exists($image_path)) {
287+
$thumb_url = $this->getFileUrl($file_name);
285288
} else {
286289
$thumb_url = null;
287290
}

0 commit comments

Comments
 (0)