diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 3483330..fbcb383 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -1862,9 +1862,14 @@ function theme_image($variables) {
   $attributes['src'] = file_create_url($variables['uri']);
 
   foreach (array('width', 'height', 'alt', 'title') as $key) {
+    // 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) . ' />';
