diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index f699d4b..7a622a6 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -1254,6 +1254,18 @@ function theme_image($variables) {
     if (isset($variables[$key])) {
       $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]);
+      }
+    }
   }
 
   return '<img' . new Attribute($attributes) . ' />';
