diff --git src/wp-includes/media.php src/wp-includes/media.php
index 17af247..1d4a3f2 100644
--- src/wp-includes/media.php
+++ src/wp-includes/media.php
@@ -818,7 +818,7 @@ function wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = fa
 			if ( is_array( $image_meta ) ) {
 				$size_array = array( absint( $width ), absint( $height ) );
 				$sources    = wp_calculate_image_srcset( $src, $size_array, $image_meta, $attachment_id );
-				$sizes      = wp_get_attachment_image_sizes( $size_array, $image_meta, $attachment_id );
+				$sizes      = wp_get_attachment_image_sizes( $size, $image_meta, $attachment_id );
 
 				if ( count( $sources ) > 1 && ( $sizes || ! empty( $attr['sizes'] ) ) ) {
 					$attr['srcset'] = wp_image_srcset_attr( $sources, $size_array, $image_meta, $attachment_id );
diff --git tests/phpunit/tests/media.php tests/phpunit/tests/media.php
index 3a71bd2..5a51c8b 100644
--- tests/phpunit/tests/media.php
+++ tests/phpunit/tests/media.php
@@ -926,6 +926,30 @@ EOF;
 	/**
 	 * @ticket 33641
 	 */
+	function test_wp_get_attachment_image_with_sizes_named_filter() {
+		add_filter( 'wp_get_attachment_image_sizes', array( $this, '_filter_attachment_image_sizes_named_size' ), 10, 4 );
+
+		$image = wp_get_attachment_image( self::$large_id, 'large' );
+		$srcset = '(max-width: 600px) 80vw, 600px';
+
+		$this->assertTrue( strrpos( $image, $srcset ) > 0 );
+
+		//cleanup
+		remove_filter( 'wp_get_attachment_image_sizes', array( $this, '_filter_attachment_image_sizes_named_size' ) );
+	}
+
+	// Example filter
+	function _filter_attachment_image_sizes_named_size( $sizes, $size, $image_meta, $attachment_id ) {
+		if ( $size === 'large' ) {
+			$sizes = '(max-width: 600px) 80vw, 600px';
+		}
+
+		return $sizes;
+	}
+
+	/**
+	 * @ticket 33641
+	 */
 	function test_wp_make_content_images_responsive() {
 		$image_meta = wp_get_attachment_metadata( self::$large_id );
 		$size_array = $this->_get_image_size_array_from_name( 'medium' );
