Index: contrib/file_styles/file_styles.theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/styles/contrib/file_styles/Attic/file_styles.theme.inc,v
retrieving revision 1.1.2.9
diff -u -p -r1.1.2.9 file_styles.theme.inc
--- contrib/file_styles/file_styles.theme.inc	27 Jan 2010 11:56:28 -0000	1.1.2.9
+++ contrib/file_styles/file_styles.theme.inc	30 Jun 2010 01:35:56 -0000
@@ -69,19 +69,26 @@ function theme_file_styles_image($variab
   $style_name = $variables['style_name'];
   $vars = array();
   $vars['path'] = $file->uri;
-  $vars['alt'] = isset($variables['description']) ? $variables['description'] : (isset($file->description) ? $file->description : '');
-  if (isset($variables['object']->override)) {
-    $override = $variables['object']->override;
-    $vars['alt'] = isset($override['alt']) ? $override['alt'] : $vars['alt'];
-    $vars['title'] = (isset($override['title']) && ($override['title'] !== '')) ? $override['title'] : NULL;
-    $vars['attributes'] = array();
-    $vars['attributes']['width'] = isset($override['width']) ? $override['width'] : NULL;
-    $vars['attributes']['height'] = isset($override['height']) ? $override['height'] : NULL;
-    // If height or width are not set, do not include them or they show up as
-    // width="", becoming width="1" in IE... #fail
-    $vars['attributes'] = array_filter($vars['attributes']);
+  // Allow image attributes to be provided by the passed-in file object. 'alt'
+  // and 'title' need to be separated out because they are treated specially by
+  // theme_image().
+  if (isset($file->override)) {
+    $vars['attributes'] = $file->override;
+    foreach (array('alt', 'title') as $attribute) {
+      if (isset($vars['attributes'][$attribute])) {
+        $vars[$attribute] = $vars['attributes'][$attribute];
+        unset($vars['attributes'][$attribute]);
+      }
+    }
   }
-  $vars['title'] = isset($vars['title']) ? $vars['title'] : (isset($variables['title']) ? $variables['title'] : $vars['alt']);
+  // Add default values for 'alt' and 'title'.
+  if (!isset($vars['alt'])) {
+    $vars['alt'] = isset($variables['description']) ? $variables['description'] : (isset($file->description) ? $file->description : '');
+  }
+  if (!isset($vars['title']) || $vars['title'] === '') {
+    $vars['title'] = isset($variables['title']) ? $variables['title'] : $vars['alt'];
+  }
+
   // Special case for 'original'.
   // @TODO Certainly can be more elegant than this.
   if ($style_name == 'original') {
