Skip to content

Commit 3083d4e

Browse files
Update LfmPath.php
1 parent 1a4d3a7 commit 3083d4e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/LfmPath.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,10 @@ public function generateThumbnail($file_name)
311311

312312
// generate cropped image content
313313
$this->setName($file_name)->thumb(true);
314+
$thumbWidth = $this->helper->shouldCreateCategoryThumb() && $this->helper->categoryThumbWidth() ? $this->helper->categoryThumbWidth() : config('lfm.thumb_img_width', 200);
315+
$thumbHeight = $this->helper->shouldCreateCategoryThumb() && $this->helper->categoryThumbHeight() ? $this->helper->categoryThumbHeight() : config('lfm.thumb_img_height', 200);
314316
$image = Image::make($original_image->get())
315-
->fit(config('lfm.thumb_img_width', 200), config('lfm.thumb_img_height', 200));
317+
->fit($thumbWidth, $thumbHeight);
316318

317319
$this->storage->put($image->stream()->detach(), 'public');
318320
}

0 commit comments

Comments
 (0)