Index: src/wp-includes/media.php
===================================================================
--- src/wp-includes/media.php	(revision 31637)
+++ src/wp-includes/media.php	(working copy)
@@ -313,7 +313,7 @@
 	list( $img_src, $width, $height ) = image_downsize($id, $size);
 	$hwstring = image_hwstring($width, $height);
 
-	$title = $title ? 'title="' . esc_attr( $title ) . '" ' : '';
+	$title = $title ? 'title="' . esc_attr( wptexturize( $title ) ) . '" ' : '';
 
 	$class = 'align' . esc_attr($align) .' size-' . esc_attr($size) . ' wp-image-' . $id;
 
@@ -329,7 +329,7 @@
 	 */
 	$class = apply_filters( 'get_image_tag_class', $class, $id, $align, $size );
 
-	$html = '<img src="' . esc_attr($img_src) . '" alt="' . esc_attr($alt) . '" ' . $title . $hwstring . 'class="' . $class . '" />';
+	$html = '<img src="' . esc_attr($img_src) . '" alt="' . esc_attr( wptexturize( $alt ) ) . '" ' . $title . $hwstring . 'class="' . $class . '" />';
 
 	/**
 	 * Filter the HTML content for the image tag.
@@ -745,6 +745,7 @@
 			$default_attr['alt'] = trim(strip_tags( $attachment->post_excerpt )); // If not, Use the Caption
 		if ( empty($default_attr['alt']) )
 			$default_attr['alt'] = trim(strip_tags( $attachment->post_title )); // Finally, use the title
+		$default_attr['alt'] = wptexturize( $default_attr['alt'] );
 
 		$attr = wp_parse_args($attr, $default_attr);
 
Index: tests/phpunit/tests/formatting/WPTexturize.php
===================================================================
--- tests/phpunit/tests/formatting/WPTexturize.php	(revision 31637)
+++ tests/phpunit/tests/formatting/WPTexturize.php	(working copy)
@@ -1837,4 +1837,35 @@
 			),
 		);
 	}
+
+	/**
+	 * @ticket 21221
+	 * @dataProvider data_image_title_tags
+	 */
+
+	function test_image_alt_tag( $input, $output) {
+
+		$image = get_image_tag( 1 , $input, 'title', 'left' );
+		return $this->assertEquals( '<img src="" alt="'. $output.'" title="title" class="alignleft size-medium wp-image-1" />' , $image );
+
+	}
+
+	/**
+	 * @ticket 21221
+	 * @dataProvider data_image_title_tags
+	 */
+
+	function test_image_title_tag( $input, $output) {
+
+		$image = get_image_tag( 1 , 'alt', $input, 'left' );
+		return $this->assertEquals( '<img src="" alt="alt" title="'. $output.'" class="alignleft size-medium wp-image-1" />' , $image );
+	}
+
+	function data_image_title_tags() {
+		return array_merge(
+			$this->data_apos_before_digits(),
+			$this->data_spaces_around_quotes(),
+			$this->data_year_abbr()
+		);
+	}
 }
\ No newline at end of file
