Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.1149
diff -u -p -r1.1149 common.inc
--- includes/common.inc	22 Apr 2010 21:41:09 -0000	1.1149
+++ includes/common.inc	22 Apr 2010 23:18:22 -0000
@@ -5455,7 +5455,7 @@ function drupal_common_theme() {
       'variables' => array('links' => NULL, 'attributes' => array('class' => array('links')), 'heading' => array()),
     ),
     'image' => array(
-      'variables' => array('path' => NULL, 'alt' => '', 'title' => '', 'attributes' => array(), 'getsize' => TRUE),
+      'variables' => array('path' => NULL, 'alt' => '', 'title' => NULL, 'attributes' => array(), 'getsize' => TRUE),
     ),
     'breadcrumb' => array(
       'variables' => array('breadcrumb' => NULL),
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.589
diff -u -p -r1.589 theme.inc
--- includes/theme.inc	13 Apr 2010 15:23:02 -0000	1.589
+++ includes/theme.inc	22 Apr 2010 23:19:05 -0000
@@ -1520,10 +1520,27 @@ function theme_image($variables) {
   $attributes = $variables['attributes'];
   $getsize = $variables['getsize'];
 
-  if (!$getsize || (is_file($path) && (list($width, $height, $type, $image_attributes) = @getimagesize($path)))) {
-    $attributes = drupal_attributes($attributes);
-    $url = file_create_url($path);
-    return '<img src="' . check_url($url) . '" alt="' . check_plain($alt) . '" title="' . check_plain($title) . '" ' . (isset($image_attributes) ? $image_attributes : '') . $attributes . ' />';
+  if (!$getsize || (is_file($path) && (list($width, $height) = @getimagesize($path)))) {
+    // The src attribute can be omitted, by passing NULL for $path and FALSE for
+    // $getsize.
+    if (isset($path)) {
+      $attributes['src'] = file_create_url($path);
+    }
+    // The alt attribute defaults to an empty string. By passing NULL as value,
+    // it can be omitted.
+    if (isset($alt)) {
+      $attributes['alt'] = $alt;
+    }
+    if (isset($title)) {
+      $attributes['title'] = $title;
+    }
+    if (!isset($attributes['width']) && !empty($width)) {
+      $attributes['width'] = $width;
+    }
+    if (!isset($attributes['height']) && !empty($height)) {
+      $attributes['height'] = $height;
+    }
+    return '<img' . drupal_attributes($attributes) . ' />';
   }
 }
 
Index: modules/image/image.field.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/image/image.field.inc,v
retrieving revision 1.20
diff -u -p -r1.20 image.field.inc
--- modules/image/image.field.inc	13 Apr 2010 15:23:03 -0000	1.20
+++ modules/image/image.field.inc	22 Apr 2010 23:20:31 -0000
@@ -511,8 +511,11 @@ function theme_image_formatter($variable
   $image = array(
     'path' => $item['uri'],
     'alt' => $item['alt'],
-    'title' => $item['title'],
   );
+  // Do not output an empty 'title' attribute.
+  if (drupal_strlen($item['title']) > 0) {
+    $image['title'] = $item['title'];
+  }
 
   if ($variables['image_style']) {
     $image['style_name'] = $variables['image_style'];
Index: modules/image/image.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/image/image.module,v
retrieving revision 1.38
diff -u -p -r1.38 image.module
--- modules/image/image.module	22 Apr 2010 21:43:59 -0000	1.38
+++ modules/image/image.module	22 Apr 2010 23:18:54 -0000
@@ -178,7 +178,7 @@ function image_theme() {
         'style_name' => NULL,
         'path' => NULL,
         'alt' => '',
-        'title' => '',
+        'title' => NULL,
         'attributes' => array(),
         'getsize' => TRUE,
       ),
