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();