diff --git a/uploadfs.js b/uploadfs.js
index <HASH>..<HASH> 100644
--- a/uploadfs.js
+++ b/uploadfs.js
@@ -235,7 +235,7 @@ function Uploadfs() {
           // to make the image useful on a website, but since it's a lossy
           // operation, we provide an option to disable it
 
-          var orientThis = (orientOriginals && context.info.orientation && (context.info.orientation !== 'TopLeft'));
+          var orientThis = (orientOriginals && context.info.orientation && (context.info.orientation !== 'TopLeft') && (context.info.orientation !== 'Undefined'));
           var cropThis = options.crop;
           if (orientThis || cropThis) {
             tempFile = context.tempFolder + '/oriented.' + context.extension;
gm will report the orientation as the string "Undefined" if it is unknown. This is another situation in which we should not pass the image needlessly through a convert pipeline