From 1199fb89f6d909ef9cdd027f050fe1a0816cfd78 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 24 Dec 2019 19:33:38 -0700 Subject: [PATCH] Update ImageUpdate pipeline job --- app/Jobs/ImageOptimizePipeline/ImageUpdate.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Jobs/ImageOptimizePipeline/ImageUpdate.php b/app/Jobs/ImageOptimizePipeline/ImageUpdate.php index 8460a36d7..bcdf11c28 100644 --- a/app/Jobs/ImageOptimizePipeline/ImageUpdate.php +++ b/app/Jobs/ImageOptimizePipeline/ImageUpdate.php @@ -80,6 +80,9 @@ class ImageUpdate implements ShouldQueue $storagePath = "public/m/{$monthHash}/{$userHash}"; $file = Storage::disk(config('filesystems.cloud'))->putFile($storagePath, new File($path), 'public'); $url = Storage::disk(config('filesystems.cloud'))->url($file); + $thumbFile = Storage::disk(config('filesystems.cloud'))->putFile($storagePath, new File($thumb), 'public'); + $thumbUrl = Storage::disk(config('filesystems.cloud'))->url($thumbFile); + $media->thumbnail_url = $thumbUrl; $media->cdn_url = $url; $media->optimized_url = $url; $media->save();