From 484a34cd92e2cbfb0122b9ed15227aaf14eaf7b0 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Mon, 21 Dec 2015 13:55:29 +0100 Subject: [PATCH] Fix orientation for images added via twig --- system/src/Grav/Common/Page/Medium/ImageMedium.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Page/Medium/ImageMedium.php b/system/src/Grav/Common/Page/Medium/ImageMedium.php index 3db039643..6da85af45 100644 --- a/system/src/Grav/Common/Page/Medium/ImageMedium.php +++ b/system/src/Grav/Common/Page/Medium/ImageMedium.php @@ -41,7 +41,8 @@ class ImageMedium extends Medium public static $magic_actions = [ 'resize', 'forceResize', 'cropResize', 'crop', 'zoomCrop', 'negate', 'brightness', 'contrast', 'grayscale', 'emboss', - 'smooth', 'sharp', 'edge', 'colorize', 'sepia', 'enableProgressive' + 'smooth', 'sharp', 'edge', 'colorize', 'sepia', 'enableProgressive', + 'fixOrientation' ]; /** @@ -260,6 +261,7 @@ class ImageMedium extends Medium if ($this->image) { $this->image(); $this->image->clearOperations(); // Clear previously applied operations + $this->fixOrientation(); $this->filter(); } @@ -469,6 +471,7 @@ class ImageMedium extends Medium ->setPrettyName(basename($this->get('basename'))); $this->filter(); + $this->fixOrientation(); return $this; }