From b0babe819daa7a803c965bfd72905610a1665fa9 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 26 Aug 2018 13:10:26 -0600 Subject: [PATCH] Update ImageUpdate job, skip non gd-compatible mime types from generating a thumbnail --- app/Jobs/ImageOptimizePipeline/ImageUpdate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Jobs/ImageOptimizePipeline/ImageUpdate.php b/app/Jobs/ImageOptimizePipeline/ImageUpdate.php index 94061096..482176be 100644 --- a/app/Jobs/ImageOptimizePipeline/ImageUpdate.php +++ b/app/Jobs/ImageOptimizePipeline/ImageUpdate.php @@ -43,9 +43,9 @@ class ImageUpdate implements ShouldQueue $path = storage_path('app/'. $media->media_path); $thumb = storage_path('app/'. $media->thumbnail_path); try { - ImageOptimizer::optimize($thumb); if(!in_array($media->mime, $this->protectedMimes)) { + ImageOptimizer::optimize($thumb); ImageOptimizer::optimize($path); } } catch (Exception $e) {