Index: wp-includes/feed-rss2.php
===================================================================
--- wp-includes/feed-rss2.php	(revision 13196)
+++ wp-includes/feed-rss2.php	(working copy)
@@ -17,6 +17,7 @@
 	xmlns:atom="http://www.w3.org/2005/Atom"
 	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
 	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
+	xmlns:media="http://search.yahoo.com/mrss/"
 	<?php do_action('rss2_ns'); ?>
 >
 
@@ -54,6 +55,10 @@
 		<slash:comments><?php echo get_comments_number(); ?></slash:comments>
 <?php rss_enclosure(); ?>
 	<?php do_action('rss2_item'); ?>
+	<?php  
+		$media_rss = apply_filters('media_rss', $media_rss = array());  
+		media_print_rss( $media_rss );  
+	?>
 	</item>
 	<?php endwhile; ?>
 </channel>
Index: wp-includes/feed.php
===================================================================
--- wp-includes/feed.php	(revision 13196)
+++ wp-includes/feed.php	(working copy)
@@ -534,3 +534,128 @@
 
 	return $feed;
 }
+
+
+/** 
+ * search for post content for for img tags, and add them to media_rss array
+ * 
+ * @package WordPress
+ * @subpackage Feed
+ * @since 3.0
+ */
+function wp_media_rss( $media_rss ){
+	
+	global $mrss_gallery_lookup, $post;
+	
+	// Honor the feed settings. Don't include any media that isn't in the feed.
+	if ( get_option( 'rss_use_excerpt' ) || !strlen( get_the_content() ) ) {
+		$content = the_excerpt_rss();
+	} else {
+		// If any galleries are processed, we need to capture the attachment IDs.
+		add_filter( 'wp_get_attachment_link', 'media_rss_gallery_lookup', 10, 5 );
+		$content = apply_filters( 'the_content', get_the_content() );
+		remove_filter( 'wp_get_attachment_link', 'media_rss_gallery_lookup', 10, 5 );
+		$lookup = $mrss_gallery_lookup;
+		unset( $mrss_gallery_lookup );
+	}
+
+		if( !has_post_thumbnail( $post->ID ) )
+			return $media_rss;
+			
+		$image_id = get_post_thumbnail_id( $post->ID );
+		$image_data = wp_get_attachment_metadata( $image_id );
+
+		$item['content']['attr']['url'] = wp_get_attachment_url( $image_id );
+		$item['content']['attr']['medium'] = 'image';
+		if ( !empty( $image_data['image_meta']['title'] ) ) {
+			$item['content']['children']['title']['attr']['type'] = 'plain';
+			$item['content']['children']['title']['children'][] = $image_data['image_meta']['title'];
+		} elseif ( !empty( $image_data['image_meta']['caption'] ) ) {
+			$item['content']['children']['title']['attr']['type'] = 'plain';
+			$item['content']['children']['title']['children'][] = $image_data['image_meta']['caption'];
+			$item['content']['children']['description']['children'][] = $image_data['image_meta']['caption']
+		}
+		if ( !empty( $image_data['sizes']['thumbnail ']) )
+			$item['content']['children']['thumbnail']['attr']['url'] = wp_get_attachment_thumb_url( $image_id );
+		
+		$media_rss[] = $item;
+	}
+	
+	return $media_rss; 
+}
+add_filter( 'media_rss', 'wp_media_rss' ); 
+
+function media_rss_url( $url ) {
+	
+	if ( preg_match( '!^https?://!', $url ) )
+		return $url;
+	if ( $url{0} == '/' )
+		return rtrim( get_bloginfo('home'), '/' ) . $url;
+		
+	return get_bloginfo('home') . $url;
+}
+
+function media_rss_gallery_lookup( $link, $id, $size, $permalink, $icon ) {
+	global $media_rss_gallery_lookup;
+	
+	preg_match( '/ src="(.*?)"/', $link, $matches );
+	$media_rss_gallery_lookup[$matches[1]] = $id;
+	
+	return $link;
+}
+
+/**
+ * print media_rss array to generate mrss entries such as <media:content> 
+ * 
+ * @package WordPress
+ * @subpackage Feed
+ * @since 2.8.0
+ */
+function media_print_rss( $media_rss ) {
+
+	foreach( (array)$media_rss as $elements )
+		media_print_element( $elements );
+		
+	echo "\n";
+}
+
+function media_print_element( $elements, $indent = 2 ) {
+	
+	echo "\n"; 
+	foreach ( (array)$elements as $name => $data ) {
+		
+		echo str_repeat("\t", $indent) . "<media:$name";
+		if ( !empty($data['attr']) ) {
+			foreach ( $data['attr'] as $attr => $value )
+				echo " $attr=\"" . ent2ncr($value) . "\"";
+		}
+		if ( !empty($data['children']) ) {
+			$nl = false;
+			echo ">"; 
+			foreach ( $data['children'] as $_name => $_data ) {
+				
+				if ( is_int($_name) ) {
+					
+					if ( !is_array( $_data ) ){
+						echo ent2ncr($_data);
+					}else {
+						//allow nested same level elements
+						$nl = true;
+						media_print_element( $_data, $indent + 1 );
+					}
+					
+				} else {
+					$nl = true;
+					media_print_element( array( $_name => $_data ), $indent + 1 );
+				}
+			}
+			
+			if ( $nl )
+				echo str_repeat("\t", $indent);
+				
+			echo "</media:$name>\n";
+		} else {
+			echo " />\n";
+		}
+	}
+}
\ No newline at end of file
