Update ImageUpdate job, skip non gd-compatible mime types from generating a thumbnail

pull/410/head
Daniel Supernault 7 years ago
parent 17e099c206
commit b0babe819d
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -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) {

Loading…
Cancel
Save