Daniel Supernault 6 роки тому
батько
коміт
bd7cad9984
1 змінених файлів з 3 додано та 2 видалено
  1. 3 2
      app/Util/Media/Image.php

+ 3 - 2
app/Util/Media/Image.php

@@ -110,14 +110,15 @@ class Image
         $orientation = $ratio['orientation'];
 
         try {
-            $img = Intervention::make($file)->orientate();
+            $img = Intervention::make($file);
+            $metadata = $img->exif();
+            $img->orientate();
             if($thumbnail) {
                 $img->resize($aspect['width'], $aspect['height'], function ($constraint) {
                     $constraint->aspectRatio();
                 });
             } else {
                 if(config('media.exif.database', false) == true) {
-                    $metadata = $img->exif();
                     $media->metadata = json_encode($metadata);
                 }