From 5408b16728ca42525ae59f15e589e72ab7123df9 Mon Sep 17 00:00:00 2001 From: Joshua Ruehlig Date: Mon, 11 Apr 2016 09:40:41 -0700 Subject: [PATCH] Backport #23752 to stable9 Fixes orientation of thumbnails and gallery view of JPG's with exif rotation. --- lib/private/preview/image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/preview/image.php b/lib/private/preview/image.php index b377f0e855d..3ea99d6963a 100644 --- a/lib/private/preview/image.php +++ b/lib/private/preview/image.php @@ -53,10 +53,10 @@ abstract class Image extends Provider { $fileName = $fileview->getLocalFile($path); } $image->loadFromFile($fileName); + $image->fixOrientation(); if ($useTempFile) { unlink($fileName); } - $image->fixOrientation(); if ($image->valid()) { $image->scaleDownToFit($maxX, $maxY);