From 46fdcf07186ab5a2beb09d80112650defba9e45d Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 18 Nov 2018 21:56:22 -0700 Subject: [PATCH] Update Image util --- app/Util/Media/Image.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Util/Media/Image.php b/app/Util/Media/Image.php index 0c382258b..bc88dda86 100644 --- a/app/Util/Media/Image.php +++ b/app/Util/Media/Image.php @@ -15,7 +15,7 @@ class Image public $orientation; public $acceptedMimes = [ 'image/png', - 'image/jpeg', + 'image/jpeg' ]; public function __construct() @@ -114,9 +114,11 @@ class Image if($thumbnail) { $img->crop($aspect['width'], $aspect['height']); } else { + $metadata = $img->exif(); $img->resize($aspect['width'], $aspect['height'], function ($constraint) { $constraint->aspectRatio(); }); + $media->metadata = json_encode($metadata); } $converted = $this->setBaseName($path, $thumbnail, $img->extension); $newPath = storage_path('app/'.$converted['path']);