diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index f98df80..9448fc4 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -1250,11 +1250,24 @@ function template_preprocess_links(&$variables) {
  */
 function template_preprocess_image(&$variables) {
   $variables['attributes']['src'] = file_create_url($variables['uri']);
+  $attributes = array();
 
   foreach (array('width', 'height', 'alt', 'title') as $key) {
     if (isset($variables[$key])) {
       $variables['attributes'][$key] = $variables[$key];
     }
+    // At least 'alt' defaults to an empty string; allow to omit an attribute by
+    // overriding the variable to NULL.
+    if (array_key_exists($key, $variables)) {
+      // If there is a value for the variable, it overrides the attribute.
+      if (isset($variables[$key])) {
+        $attributes[$key] = $variables[$key];
+      }
+      // Otherwise, remove the attribute.
+      else {
+        unset($attributes[$key]);
+      }
+    }
   }
 }
 
