From c8ee7f1514187e705c5659ccd2700c950888db9a Mon Sep 17 00:00:00 2001 From: philipp lang Date: Mon, 6 Sep 2021 19:14:01 +0200 Subject: [PATCH] Fixed: Get original image through storage --- classes/ImageResizer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/ImageResizer.php b/classes/ImageResizer.php index 3dd4e39..28ce8b5 100644 --- a/classes/ImageResizer.php +++ b/classes/ImageResizer.php @@ -27,7 +27,7 @@ class ImageResizer public function generate(string $file): void { $this->source = app(FileObserver::class)->normalizePath($file); - if ($this->media->findFiles($this->source)[0]->getFileType() !== 'image') { + if (Storage::mimeType(app(FileObserver::class)->fullMediaPath($file)) !== 'image/jpeg') { return; } $this->copyOriginalImage();