diff --git src/wp-includes/class-wp-image-editor-gd.php src/wp-includes/class-wp-image-editor-gd.php
index 53f0837..f3833a8 100644
--- src/wp-includes/class-wp-image-editor-gd.php
+++ src/wp-includes/class-wp-image-editor-gd.php
@@ -124,6 +124,33 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
 		$this->update_size( $size[0], $size[1] );
 		$this->mime_type = $size['mime'];
 
+		$exif = exif_read_data($this->file);
+        if($exif) {
+            $orientation = 0;
+
+            if(!$orientation && isset($exif["Orientation"]))
+                $orientation = $exif["Orientation"];
+
+            if(!$orientation && isset($exif["IFD0"]) && isset($exif["IFD0"]["Orientation"]))
+                $orientation = $exif["IFD0"]["Orientation"];
+
+            if(!$orientation && isset($exif["COMPUTED"]) && isset($exif["COMPUTED"]["Orientation"]))
+                $orientation = $exif["COMPUTED"]["Orientation"];
+
+
+            switch($orientation) {
+                case 3:
+                    $this->rotate(180);
+                    break;
+                case 6:
+                    $this->rotate(-90);
+                    break;
+                case 8:
+                    $this->rotate(90);
+                    break;
+            }
+        }
+
 		return $this->set_quality();
 	}
 
