diff --git a/src/LaravelThumbnail.php b/src/LaravelThumbnail.php index f6aebfd..a536985 100644 --- a/src/LaravelThumbnail.php +++ b/src/LaravelThumbnail.php @@ -4,7 +4,7 @@ use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Storage; -use Intervention\Image\Facades\Image; +use Intervention\Image\Laravel\Facades\Image; class LaravelThumbnail { @@ -73,7 +73,7 @@ public static function generate($image, $width = null, $height = null, $type = ' } // if thumbnail do not exist, we make it - $image = Image::make($imageFileFullPath); + $image = Image::read($imageFileFullPath); switch ($type) { case 'fit': @@ -96,8 +96,8 @@ public static function generate($image, $width = null, $height = null, $type = ' }); } case 'resizeCanvas': - { - $image->resizeCanvas($width, $height, 'center', false, 'rgba(0, 0, 0, 0)'); // gets the center part + { + $image->resizeCanvas($width, $height, 'ff0', 'center'); // gets the center part } }