diff --git src/wp-includes/class-wp-image-editor.php src/wp-includes/class-wp-image-editor.php
index 2db73f0..f6e1c12 100644
--- src/wp-includes/class-wp-image-editor.php
+++ src/wp-includes/class-wp-image-editor.php
@@ -233,6 +233,11 @@ abstract class WP_Image_Editor {
 			/**
 			 * Filter the default image compression quality setting.
 			 *
+			 * Applies only during initial editor instantiation, or when set_quality() is run
+			 * manually without an argument after editor instantiation.
+			 *
+			 * set_quality() has priority over the filter.
+			 *
 			 * @since 3.5.0
 			 *
 			 * @param int    $quality   Quality level between 1 (low) and 100 (high).
@@ -244,6 +249,11 @@ abstract class WP_Image_Editor {
 				/**
 				 * Filter the JPEG compression quality for backward-compatibility.
 				 *
+				 * Applies only during initial editor instantiation, or when set_quality() is run
+				 * manually without an argument after instantiation.
+				 *
+				 * set_quality() has priority over the filter.
+				 *
 				 * The filter is evaluated under two contexts: 'image_resize', and 'edit_image',
 				 * (when a JPEG image is saved to file).
 				 *
diff --git tests/phpunit/includes/mock-image-editor.php tests/phpunit/includes/mock-image-editor.php
index 808b32d..a799bd0 100644
--- tests/phpunit/includes/mock-image-editor.php
+++ tests/phpunit/includes/mock-image-editor.php
@@ -8,6 +8,11 @@ if (class_exists( 'WP_Image_Editor' ) ) :
 		public static $test_return = true;
 		public static $save_return = array();
 
+		// Allow testing of jpeg_quality filter.
+		public function set_mime_type( $mime_type = null ) {
+			$this->mime_type = $mime_type;
+		}
+
 		public function load() {
 			return self::$load_return;
 		}
diff --git tests/phpunit/tests/image/editor.php tests/phpunit/tests/image/editor.php
index 2844a08..14261e7 100644
--- tests/phpunit/tests/image/editor.php
+++ tests/phpunit/tests/image/editor.php
@@ -51,22 +51,42 @@ class Tests_Image_Editor extends WP_Image_UnitTestCase {
 
 		// Get an editor
 		$editor = wp_get_image_editor( DIR_TESTDATA . '/images/canola.jpg' );
+		$editor->set_mime_type( "image/jpeg" ); // Ensure mime-specific filters act properly.
 
 		// Check default value
 		$this->assertEquals( 90, $editor->get_quality() );
 
-		// Ensure set_quality works
+		// Ensure the quality filters do not have precedence if created after editor instantiation.
+		$func_100_percent = create_function( '', "return 100;" );
+		add_filter( 'wp_editor_set_quality', $func_100_percent );
+		$this->assertEquals( 90, $editor->get_quality() );
+
+		$func_95_percent = create_function( '', "return 95;" );
+		add_filter( 'jpeg_quality', $func_95_percent );
+		$this->assertEquals( 90, $editor->get_quality() );
+
+		// Ensure set_quality() works and overrides the filters
 		$this->assertTrue( $editor->set_quality( 75 ) );
 		$this->assertEquals( 75, $editor->get_quality() );
 
-		// Ensure the quality filter works
-		$func = create_function( '', "return 100;");
-		add_filter( 'wp_editor_set_quality', $func );
-		$this->assertTrue( $editor->set_quality( 70 ) );
-		$this->assertEquals( 70, $editor->get_quality() );
+		// Get a new editor to clear default quality state
+		unset( $editor );
+		$editor = wp_get_image_editor( DIR_TESTDATA . '/images/canola.jpg' );
+		$editor->set_mime_type( "image/jpeg" ); // Ensure mime-specific filters act properly.
+
+		// Ensure jpeg_quality filter applies if it exists before editor instantiation.
+		$this->assertEquals( 95, $editor->get_quality() );
+
+		// Get a new editor to clear jpeg_quality state
+		remove_filter( 'jpeg_quality', $func_95_percent );
+		unset( $editor );
+		$editor = wp_get_image_editor( DIR_TESTDATA . '/images/canola.jpg' );
+
+		// Ensure wp_editor_set_quality filter applies if it exists before editor instantiation.
+		$this->assertEquals( 100, $editor->get_quality() );
 
 		// Clean up
-		remove_filter( 'wp_editor_set_quality', $func );
+		remove_filter( 'wp_editor_set_quality', $func_100_percent );
 	}
 
 	/**
