diff --git a/src/wp-admin/includes/admin-filters.php b/src/wp-admin/includes/admin-filters.php
index e80c111dde..f5f9600332 100644
--- a/src/wp-admin/includes/admin-filters.php
+++ b/src/wp-admin/includes/admin-filters.php
@@ -37,6 +37,8 @@ add_filter( 'media_upload_library', 'media_upload_library' );
 
 add_filter( 'media_upload_tabs', 'update_gallery_tab' );
 
+add_filter( 'image_editor_output_format', 'wp_default_image_output_mapping' );
+
 // Admin color schemes.
 add_action( 'admin_init', 'register_admin_color_schemes', 1 );
 add_action( 'admin_head', 'wp_color_scheme_settings' );
diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php
index 510fff563d..32455d1a5e 100644
--- a/src/wp-admin/includes/media.php
+++ b/src/wp-admin/includes/media.php
@@ -3843,3 +3843,12 @@ function wp_media_attach_action( $parent_id, $action = 'attach' ) {
 		exit;
 	}
 }
+
+/**
+ * Returns the default image output mapping.
+ *
+ * @since 6.1.0
+ */
+function wp_default_image_output_mapping() {
+	return array( 'image/jpeg' => 'image/webp' );
+}
diff --git a/src/wp-includes/class-wp-image-editor.php b/src/wp-includes/class-wp-image-editor.php
index caa3092d36..48472bb11f 100644
--- a/src/wp-includes/class-wp-image-editor.php
+++ b/src/wp-includes/class-wp-image-editor.php
@@ -446,6 +446,14 @@ abstract class WP_Image_Editor {
 		$name    = wp_basename( $this->file, ".$ext" );
 		$new_ext = strtolower( $extension ? $extension : $ext );
 
+		// When the file extension being generated doesn't match the original image file extension,
+		// add the original extension to the suffix to ensure a unique file name. Prevents
+		// generated file name conflicts when a source image type can have multiple extensions,
+		// eg. .jpg, .jpeg and .jpe are all valid JPEG extensions.
+		if ( ! empty( $extension ) && $extension !== $ext ) {
+			$suffix .= "-{$ext}";
+		}
+
 		if ( ! is_null( $dest_path ) ) {
 			if ( ! wp_is_stream( $dest_path ) ) {
 				$_dest_path = realpath( $dest_path );
diff --git a/tests/phpunit/tests/ajax/MediaEdit.php b/tests/phpunit/tests/ajax/MediaEdit.php
index 686dae08c5..60e4cd2105 100644
--- a/tests/phpunit/tests/ajax/MediaEdit.php
+++ b/tests/phpunit/tests/ajax/MediaEdit.php
@@ -67,6 +67,7 @@ class Tests_Ajax_MediaEdit extends WP_Ajax_UnitTestCase {
 	 */
 	public function testImageEditOverwriteConstant() {
 		define( 'IMAGE_EDIT_OVERWRITE', true );
+		$files_that_shouldnt_exist = array();
 
 		require_once ABSPATH . 'wp-admin/includes/image-edit.php';
 
diff --git a/tests/phpunit/tests/image/editor.php b/tests/phpunit/tests/image/editor.php
index 487dad0664..73e4ae8f8e 100644
--- a/tests/phpunit/tests/image/editor.php
+++ b/tests/phpunit/tests/image/editor.php
@@ -18,6 +18,7 @@ class Tests_Image_Editor extends WP_Image_UnitTestCase {
 		require_once ABSPATH . WPINC . '/class-wp-image-editor.php';
 
 		require_once DIR_TESTDATA . '/../includes/mock-image-editor.php';
+		add_filter( 'image_editor_output_format', '__return_empty_array' );
 
 		// This needs to come after the mock image editor class is loaded.
 		parent::set_up();
@@ -226,10 +227,10 @@ class Tests_Image_Editor extends WP_Image_UnitTestCase {
 		$this->assertSame( trailingslashit( realpath( get_temp_dir() ) ), trailingslashit( realpath( dirname( $editor->generate_filename( null, get_temp_dir() ) ) ) ) );
 
 		// Test with a suffix only.
-		$this->assertSame( 'canola-100x50.png', wp_basename( $editor->generate_filename( null, null, 'png' ) ) );
+		$this->assertSame( 'canola-100x50-jpg.png', wp_basename( $editor->generate_filename( null, null, 'png' ) ) );
 
 		// Combo!
-		$this->assertSame( trailingslashit( realpath( get_temp_dir() ) ) . 'canola-new.png', $editor->generate_filename( 'new', realpath( get_temp_dir() ), 'png' ) );
+		$this->assertSame( trailingslashit( realpath( get_temp_dir() ) ) . 'canola-new-jpg.png', $editor->generate_filename( 'new', realpath( get_temp_dir() ), 'png' ) );
 
 		// Test with a stream destination.
 		$this->assertSame( 'file://testing/path/canola-100x50.jpg', $editor->generate_filename( null, 'file://testing/path' ) );
diff --git a/tests/phpunit/tests/image/editorGd.php b/tests/phpunit/tests/image/editorGd.php
index 5d967bdcdb..2e3828ffe8 100644
--- a/tests/phpunit/tests/image/editorGd.php
+++ b/tests/phpunit/tests/image/editorGd.php
@@ -17,6 +17,8 @@ class Tests_Image_Editor_GD extends WP_Image_UnitTestCase {
 		require_once ABSPATH . WPINC . '/class-wp-image-editor.php';
 		require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php';
 
+		remove_filter( 'image_editor_output_format', 'wp_default_image_output_mapping' );
+
 		// This needs to come after the mock image editor class is loaded.
 		parent::set_up();
 	}
diff --git a/tests/phpunit/tests/image/editorImagick.php b/tests/phpunit/tests/image/editorImagick.php
index 02e0590a2e..66e1014a03 100644
--- a/tests/phpunit/tests/image/editorImagick.php
+++ b/tests/phpunit/tests/image/editorImagick.php
@@ -18,6 +18,8 @@ class Tests_Image_Editor_Imagick extends WP_Image_UnitTestCase {
 		require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php';
 		require_once DIR_TESTROOT . '/includes/class-wp-test-stream.php';
 
+		remove_filter( 'image_editor_output_format', 'wp_default_image_output_mapping' );
+
 		// This needs to come after the mock image editor class is loaded.
 		parent::set_up();
 	}
diff --git a/tests/phpunit/tests/image/functions.php b/tests/phpunit/tests/image/functions.php
index 86d559145e..2cc73fdfa9 100644
--- a/tests/phpunit/tests/image/functions.php
+++ b/tests/phpunit/tests/image/functions.php
@@ -25,6 +25,8 @@ class Tests_Image_Functions extends WP_UnitTestCase {
 		foreach ( glob( $folder ) as $file ) {
 			unlink( $file );
 		}
+
+		remove_filter( 'image_editor_output_format', 'wp_default_image_output_mapping' );
 	}
 
 	/**
diff --git a/tests/phpunit/tests/image/intermediateSize.php b/tests/phpunit/tests/image/intermediateSize.php
index 830359427a..df8d99ad91 100644
--- a/tests/phpunit/tests/image/intermediateSize.php
+++ b/tests/phpunit/tests/image/intermediateSize.php
@@ -15,6 +15,15 @@ class Tests_Image_Intermediate_Size extends WP_UnitTestCase {
 		parent::tear_down();
 	}
 
+	/**
+	 * Set up the test fixture.
+	 */
+	public function set_up() {
+		remove_filter( 'image_editor_output_format', 'wp_default_image_output_mapping' );
+
+		parent::set_up();
+	}
+
 	public function _make_attachment( $file, $parent_post_id = 0 ) {
 		$contents = file_get_contents( $file );
 		$upload   = wp_upload_bits( wp_basename( $file ), null, $contents );
diff --git a/tests/phpunit/tests/image/resize.php b/tests/phpunit/tests/image/resize.php
index 5b302ce295..5043f4e4e6 100644
--- a/tests/phpunit/tests/image/resize.php
+++ b/tests/phpunit/tests/image/resize.php
@@ -14,6 +14,7 @@ abstract class WP_Tests_Image_Resize_UnitTestCase extends WP_Image_UnitTestCase
 		parent::set_up();
 
 		add_filter( 'wp_image_editors', array( $this, 'wp_image_editors' ) );
+		remove_filter( 'image_editor_output_format', 'wp_default_image_output_mapping' );
 	}
 
 	public function wp_image_editors() {
diff --git a/tests/phpunit/tests/media.php b/tests/phpunit/tests/media.php
index ba4bedf51e..e55a757767 100644
--- a/tests/phpunit/tests/media.php
+++ b/tests/phpunit/tests/media.php
@@ -33,7 +33,8 @@ CAP;
 		self::$_sizes                          = wp_get_additional_image_sizes();
 		$GLOBALS['_wp_additional_image_sizes'] = array();
 
-		$filename       = DIR_TESTDATA . '/images/' . self::$large_filename;
+		$filename = DIR_TESTDATA . '/images/' . self::$large_filename;
+		remove_filter( 'image_editor_output_format', 'wp_default_image_output_mapping' );
 		self::$large_id = $factory->attachment->create_upload_object( $filename );
 
 		$post_statuses = array( 'publish', 'future', 'draft', 'auto-draft', 'trash' );
@@ -3617,6 +3618,16 @@ EOF;
 		// Clean up the above filter.
 		remove_filter( 'wp_omit_loading_attr_threshold', '__return_null', 100 );
 	}
+
+	/**
+	 * Test the wp_default_image_output_mapping function.
+	 *
+	 * @ticket 55443
+	 */
+	public function test_wp_default_image_output_mapping() {
+		$mapping = wp_default_image_output_mapping();
+		$this->assertSame( array( 'image/jpeg' => 'image/webp' ), $mapping );
+	}
 }
 
 /**
diff --git a/tests/phpunit/tests/post/attachments.php b/tests/phpunit/tests/post/attachments.php
index 2922c185d2..5aa507248a 100644
--- a/tests/phpunit/tests/post/attachments.php
+++ b/tests/phpunit/tests/post/attachments.php
@@ -6,6 +6,14 @@
  * @group upload
  */
 class Tests_Post_Attachments extends WP_UnitTestCase {
+	/**
+	 * Set up the test fixture.
+	 */
+	public function set_up() {
+		remove_filter( 'image_editor_output_format', 'wp_default_image_output_mapping' );
+
+		parent::set_up();
+	}
 
 	public function tear_down() {
 		// Remove all uploads.
diff --git a/tests/phpunit/tests/rest-api/rest-attachments-controller.php b/tests/phpunit/tests/rest-api/rest-attachments-controller.php
index 106906ee2b..588a84d0ea 100644
--- a/tests/phpunit/tests/rest-api/rest-attachments-controller.php
+++ b/tests/phpunit/tests/rest-api/rest-attachments-controller.php
@@ -93,6 +93,7 @@ class WP_Test_REST_Attachments_Controller extends WP_Test_REST_Post_Type_Control
 
 		add_filter( 'rest_pre_dispatch', array( $this, 'wpSetUpBeforeRequest' ), 10, 3 );
 		add_filter( 'posts_clauses', array( $this, 'save_posts_clauses' ), 10, 2 );
+		remove_filter( 'image_editor_output_format', 'wp_default_image_output_mapping' );
 	}
 
 	public function wpSetUpBeforeRequest( $result ) {
