diff --git a/src/BladeImageCrop.php b/src/BladeImageCrop.php index e49af9a..3ac8c19 100644 --- a/src/BladeImageCrop.php +++ b/src/BladeImageCrop.php @@ -13,7 +13,7 @@ public function fire($url, $dimensions, $offset = ['x'=>50, 'y'=>50], $format = $url = trim($url, "/"); - if ($this->fileNotFound($url)){ + if ($this->fileNotImage($url)){ if (!\App::environment(['local'])) { return 'IMAGENOTFOUND'; } @@ -31,7 +31,7 @@ public function fire($url, $dimensions, $offset = ['x'=>50, 'y'=>50], $format = return $newImageUrl; } - public function fileNotFound($url){ + public function fileNotImage($url){ return !Storage::disk( config('bladeimagecrop.disk') )->has($url) || Storage::disk( config('bladeimagecrop.disk') )->getMetadata($url)['type'] != 'file' || pathinfo(Storage::disk( config('bladeimagecrop.disk') )->url($url), PATHINFO_EXTENSION) === '';