Skip to content

Commit

Permalink
Fix images not orrientated when uploaded through VoyagerController@up…
Browse files Browse the repository at this point in the history
…load (#3906)
  • Loading branch information
noreff authored and emptynick committed Feb 23, 2019
1 parent 8a896dc commit 6e4f171
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Http/Controllers/VoyagerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ public function upload(Request $request)
->resize($resizeWidth, $resizeHeight, function (Constraint $constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})
->encode($file->getClientOriginalExtension(), 75);
});
if ($ext !== 'gif') {
$image->orientate();
}
$image->encode($file->getClientOriginalExtension(), 75);

// move uploaded file from temp to uploads directory
if (Storage::disk(config('voyager.storage.disk'))->put($fullPath, (string) $image, 'public')) {
Expand Down

0 comments on commit 6e4f171

Please sign in to comment.