Fix orientation for images added via twig

This commit is contained in:
Flavio Copes
2015-12-21 13:55:29 +01:00
parent 5ab4d916b0
commit 484a34cd92

View File

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