Selaa lähdekoodia

Update Image util

Daniel Supernault 6 vuotta sitten
vanhempi
commit
bd7cad9984
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      app/Util/Media/Image.php

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

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