diff --git a/wp-admin/includes/image-edit.php b/wp-admin/includes/image-edit.php
index 55d590278a..5c3c851540 100644
--- a/wp-admin/includes/image-edit.php
+++ b/wp-admin/includes/image-edit.php
@@ -40,14 +40,14 @@ function wp_image_editor($post_id, $msg = false) {
, this)" class="imgedit-crop disabled" title="">
+ if ( wp_image_editor_supports( array( 'mime_type' => get_post_mime_type( $post_id ), 'methods' => array( 'rotate' ) ) ) ) { ?>
, this)" title="">
, this)" title="">
-
-
+
+
, this)" class="imgedit-flipv" title="">
diff --git a/wp-includes/class-wp-image-editor-gd.php b/wp-includes/class-wp-image-editor-gd.php
index 8a5d846d35..92dd28767a 100644
--- a/wp-includes/class-wp-image-editor-gd.php
+++ b/wp-includes/class-wp-image-editor-gd.php
@@ -37,6 +37,14 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
if ( ! extension_loaded('gd') || ! function_exists('gd_info') )
return false;
+ // On some setups GD library does not provide imagerotate() - Ticket #11536
+ if ( isset( $args['methods'] ) &&
+ in_array( 'rotate', $args['methods'] ) &&
+ ! function_exists('imagerotate') ){
+
+ return false;
+ }
+
return true;
}