diff --git src/wp-includes/media.php src/wp-includes/media.php
index 065efde579..f068469e52 100644
--- src/wp-includes/media.php
+++ src/wp-includes/media.php
@@ -3838,6 +3838,7 @@ function wp_max_upload_size() {
 function wp_get_image_editor( $path, $args = array() ) {
 	$args['path'] = $path;
 
+	// If the mime type is not set in args, try to extract and set it from the file.
 	if ( ! isset( $args['mime_type'] ) ) {
 		$file_info = wp_check_filetype( $args['path'] );
 
@@ -3848,6 +3849,14 @@ function wp_get_image_editor( $path, $args = array() ) {
 		}
 	}
 
+	$mime_type = isset( $args['mime_type'] ) ? $args['mime_type'] : '';
+
+	/** This filter is documented in wp-includes/class-wp-image-editor.php */
+	$output_format = apply_filters( 'image_editor_output_format', array(), $path, $mime_type );
+	if ( '' !== $mime_type && isset( $output_format[ $mime_type ] ) ) {
+		$args['output_mime_type'] = $output_format[ $mime_type ];
+	}
+
 	$implementation = _wp_image_editor_choose( $args );
 
 	if ( $implementation ) {
@@ -3900,12 +3909,14 @@ function _wp_image_editor_choose( $args = array() ) {
 	 *                                'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD'.
 	 */
 	$implementations = apply_filters( 'wp_image_editors', array( 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD' ) );
+	$supports_input  = false;
 
 	foreach ( $implementations as $implementation ) {
 		if ( ! call_user_func( array( $implementation, 'test' ), $args ) ) {
 			continue;
 		}
 
+		// Implementation should support the passed mime type.
 		if ( isset( $args['mime_type'] ) &&
 			! call_user_func(
 				array( $implementation, 'supports_mime_type' ),
@@ -3914,16 +3925,31 @@ function _wp_image_editor_choose( $args = array() ) {
 			continue;
 		}
 
+		// Implementation should support requested methods.
 		if ( isset( $args['methods'] ) &&
 			array_diff( $args['methods'], get_class_methods( $implementation ) ) ) {
 
 			continue;
 		}
 
+		// Implementation should ideally support the output mime type as well if set and different than the passed type.
+		if (
+			isset( $args['mime_type'] ) &&
+			isset( $args['output_mime_type'] ) &&
+			$args['mime_type'] !== $args['output_mime_type'] &&
+			! call_user_func( array( $implementation, 'supports_mime_type' ), $args['output_mime_type'] )
+		) {
+			// This implementation supports the imput type but not the output type.
+			// Keep looking to see if we can find an implementation that supports both.
+			$supports_input = $implementation;
+			continue;
+		}
+
+		// Favor the implementation that supports both input and output mime types.
 		return $implementation;
 	}
 
-	return false;
+	return $supports_input;
 }
 
 /**
diff --git tests/phpunit/tests/image/editor.php tests/phpunit/tests/image/editor.php
index 487dad0664..95981bad82 100644
--- tests/phpunit/tests/image/editor.php
+++ tests/phpunit/tests/image/editor.php
@@ -126,7 +126,7 @@ class Tests_Image_Editor extends WP_Image_UnitTestCase {
 		$this->assertSame( 82, $editor->get_quality(), 'Default quality setting is 82.' );
 
 		// Quality should change to the output format's value.
-		// A PNG image will be converted to WEBP whose quialty should be 86.
+		// A PNG image will be converted to WEBP whose quality should be 86.
 		$editor->save();
 		$this->assertSame( 86, $editor->get_quality(), 'Output image format is WEBP. Quality setting for it should be 86.' );
 
