diff --git tests/phpunit/tests/media.php tests/phpunit/tests/media.php
index 55a53a1..bbce06d 100644
--- tests/phpunit/tests/media.php
+++ tests/phpunit/tests/media.php
@@ -1059,6 +1059,24 @@ EOF;
 	}
 
 	/**
+	 * When we're rendering a 'srcset' for responsive images we're relying on the wp-image-* class name,
+	 * but the class name may not be consistent with attachment IDs when working with imported content
+	 * or when editing the src attribute manually. This can result in different images shown on different
+	 * screen sizes or screen densities.
+	 *
+	 * @ticket 34898
+	 * @ticket 33641
+	 */
+	function test_wp_make_content_images_responsive_wrong() {
+		$image = get_image_tag( self::$large_id, '', '', '', 'medium' );
+
+		// Replace the src URL
+		$image_wrong_src = preg_replace( '|src="[^"]+"|', 'src="http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/foo.jpg"', $image );
+
+		$this->assertSame( $image_wrong_src, wp_make_content_images_responsive( $image_wrong_src) );
+	}
+
+	/**
 	 * @ticket 33641
 	 */
 	function test_wp_make_content_images_responsive_with_preexisting_srcset() {
