Index: src/wp-includes/media.php
===================================================================
--- src/wp-includes/media.php	(revision 35732)
+++ src/wp-includes/media.php	(working copy)
@@ -1211,8 +1211,8 @@
 	$selected_images = $attachment_ids = array();
 
 	foreach( $images as $image ) {
-		if ( false === strpos( $image, ' srcset=' ) && preg_match( '/wp-image-([0-9]+)/i', $image, $class_id ) &&
-			( $attachment_id = absint( $class_id[1] ) ) ) {
+		if ( false === strpos( $image, ' srcset=' ) && false === strpos( $image, ' sizes=' ) &&
+			preg_match( '/wp-image-([0-9]+)/i', $image, $class_id ) && ( $attachment_id = absint( $class_id[1] ) ) ) {
 
 			/*
 			 * If exactly the same image tag is used more than once, overwrite it.
@@ -1308,22 +1308,13 @@
 	$srcset = wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attachment_id );
 
 	if ( $srcset ) {
-		// Check if there is already a 'sizes' attribute.
-		$sizes = strpos( $image, ' sizes=' );
-
-		if ( ! $sizes ) {
-			$sizes = wp_calculate_image_sizes( $size_array, $image_src, $image_meta, $attachment_id );
-		}
+		$sizes = wp_calculate_image_sizes( $size_array, $image_src, $image_meta, $attachment_id );
 	}
 
 	if ( $srcset && $sizes ) {
 		// Format the 'srcset' and 'sizes' string and escape attributes.
-		$attr = sprintf( ' srcset="%s"', esc_attr( $srcset ) );
+		$attr = sprintf( ' srcset="%s" sizes="%s"', esc_attr( $srcset ), esc_attr( $sizes ) );
 
-		if ( is_string( $sizes ) ) {
-			$attr .= sprintf( ' sizes="%s"', esc_attr( $sizes ) );
-		}
-
 		// Add 'srcset' and 'sizes' attributes to the image markup.
 		$image = preg_replace( '/<img ([^>]+?)[\/ ]*>/', '<img $1' . $attr . ' />', $image );
 	}
Index: tests/phpunit/tests/media.php
===================================================================
--- tests/phpunit/tests/media.php	(revision 35732)
+++ tests/phpunit/tests/media.php	(working copy)
@@ -967,7 +967,6 @@
 		$respimg = preg_replace( '|<img ([^>]+) />|', '<img $1 ' . $srcset . ' ' . $sizes . ' />', $img );
 		$respimg_no_size_in_class = preg_replace( '|<img ([^>]+) />|', '<img $1 ' . $srcset . ' ' . $sizes . ' />', $img_no_size_in_class );
 		$respimg_no_width_height = preg_replace( '|<img ([^>]+) />|', '<img $1 ' . $srcset . ' ' . $sizes . ' />', $img_no_width_height );
-		$respimg_with_sizes_attr = preg_replace('|<img ([^>]+) />|', '<img $1 ' . $srcset . ' />', $img_with_sizes_attr );
 
 		$content = '
 			<p>Image, standard. Should have srcset and sizes.</p>
@@ -982,11 +981,11 @@
 			<p>Image, no attachment ID class. Should NOT have srcset and sizes.</p>
 			%4$s
 
-			<p>Image, with sizes attribute. Should NOT have two sizes attributes.</p>
+			<p>Image, with sizes attribute. Should NOT have srcset and sizes.</p>
 			%5$s';
 
 		$content_unfiltered = sprintf( $content, $img, $img_no_size_in_class, $img_no_width_height, $img_no_size_id, $img_with_sizes_attr );
-		$content_filtered = sprintf( $content, $respimg, $respimg_no_size_in_class, $respimg_no_width_height, $img_no_size_id, $respimg_with_sizes_attr );
+		$content_filtered = sprintf( $content, $respimg, $respimg_no_size_in_class, $respimg_no_width_height, $img_no_size_id, $img_with_sizes_attr );
 
 		$this->assertSame( $content_filtered, wp_make_content_images_responsive( $content_unfiltered ) );
 	}
