diff --git a/nuxeo-platform-imaging/nuxeo-platform-imaging-core/src/main/resources/OSGI-INF/commandline-imagemagick-contrib.xml b/nuxeo-platform-imaging/nuxeo-platform-imaging-core/src/main/resources/OSGI-INF/commandline-imagemagick-contrib.xml
index 8a5ca3912b..b2f59717b6 100644
--- a/nuxeo-platform-imaging/nuxeo-platform-imaging-core/src/main/resources/OSGI-INF/commandline-imagemagick-contrib.xml
+++ b/nuxeo-platform-imaging/nuxeo-platform-imaging-core/src/main/resources/OSGI-INF/commandline-imagemagick-contrib.xml
@@ -22,8 +22,8 @@
convert
- -quiet -depth #{targetDepth} #{inputFilePath}[0] jpg:- | convert - -resize #{targetWidth}x#{targetHeight} #{outputFilePath}
- -quiet -depth #{targetDepth} #{inputFilePath}[0] -resize #{targetWidth}x#{targetHeight} #{outputFilePath}
+ -quiet -auto-orient -depth #{targetDepth} #{inputFilePath}[0] jpg:- | convert - -resize #{targetWidth}x#{targetHeight} #{outputFilePath}
+ -quiet -auto-orient -depth #{targetDepth} #{inputFilePath}[0] -resize #{targetWidth}x#{targetHeight} #{outputFilePath}
You need to install ImageMagic.
diff --git a/nuxeo-thumbnail/src/main/resources/OSGI-INF/thumbnail-commandline-imagemagick-contrib.xml b/nuxeo-thumbnail/src/main/resources/OSGI-INF/thumbnail-commandline-imagemagick-contrib.xml
index c569f516ff..9b72e0da05 100755
--- a/nuxeo-thumbnail/src/main/resources/OSGI-INF/thumbnail-commandline-imagemagick-contrib.xml
+++ b/nuxeo-thumbnail/src/main/resources/OSGI-INF/thumbnail-commandline-imagemagick-contrib.xml
@@ -8,8 +8,8 @@
convert
- -quiet -strip -thumbnail #{size} -background transparent -gravity center -format png -quality 75 #{inputFilePath}[0] #{outputFilePath}
- -quiet -strip -thumbnail #{size} -background transparent -gravity center -format png -quality 75 #{inputFilePath}[0] #{outputFilePath}
+ -quiet -strip -thumbnail #{size} -auto-orient -background transparent -gravity center -format png -quality 75 #{inputFilePath}[0] #{outputFilePath}
+ -quiet -strip -thumbnail #{size} -auto-orient -background transparent -gravity center -format png -quality 75 #{inputFilePath}[0] #{outputFilePath}
You need to install ImageMagick.