Skip to content

Commit 6345d47

Browse files
authored
Merge pull request #712 from mnightingale/non_local_thumbnails
Support thumbnail creation on non-local filesystems
2 parents 77781d2 + 8d199e7 commit 6345d47

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/LfmPath.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,10 @@ public function makeThumbnail($file_name)
311311
$this->setName(null)->thumb(true)->createFolder();
312312

313313
// generate cropped image content
314-
$image_path = $this->setName($file_name)->thumb(true)->path('absolute');
314+
$this->setName($file_name)->thumb(true);
315315
$image = Image::make($original_image->get())
316-
->fit(config('lfm.thumb_img_width', 200), config('lfm.thumb_img_height', 200))
317-
->save($image_path);
316+
->fit(config('lfm.thumb_img_width', 200), config('lfm.thumb_img_height', 200));
317+
318+
$this->storage->put($image->stream()->detach());
318319
}
319320
}

0 commit comments

Comments
 (0)