Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoyigi committed Sep 15, 2020
2 parents ad5de14 + a461f07 commit 7e81f52
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/main/classes/MediaLibrary.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,14 @@ public function getMediaThumb($path, $options)
if (!File::exists($filePath))
$filePath = $this->getDefaultThumbPath($thumbPath, array_get($options, 'default'));

Manipulator::make($filePath)
->useSource($this->getStorageDisk()->getDriver())
->manipulate(array_except($options, ['extension', 'default']))
->save($thumbPath);
$manipulator = Manipulator::make($filePath)->useSource(
$this->getStorageDisk()->getDriver()
);

if ($manipulator->isSupported())
$manipulator->manipulate(array_except($options, ['extension', 'default']));

$manipulator->save($thumbPath);

return asset($thumbPublicPath);
}
Expand Down
1 change: 1 addition & 0 deletions app/system/providers.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
Laravel\Tinker\TinkerServiceProvider::class,

// TastyIgniter flame providers
Igniter\Flame\Foundation\Providers\ConsoleSupportServiceProvider::class,
Expand Down

0 comments on commit 7e81f52

Please sign in to comment.