Update Image util

This commit is contained in:
Daniel Supernault 2019-08-01 22:38:26 -06:00
parent 3e5af1b98a
commit bd7cad9984
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -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);
}