diff --git a/imagecache_token.module b/imagecache_token.module
index 2444c01..7f1d63e 100644
--- a/imagecache_token.module
+++ b/imagecache_token.module
@@ -78,6 +78,8 @@ function imagecache_token_tokens($type, $tokens, array $data = array(), array $o
     }
   }
 
+  $images_style_sizes = & drupal_static(__FUNCTION__);
+
   if ($type == 'image-field' && !empty($data['image-field'])) {
     foreach ($tokens as $token => $original) {
       $output = array();
@@ -91,17 +93,39 @@ function imagecache_token_tokens($type, $tokens, array $data = array(), array $o
           $output[] = theme('image_formatter', array('item' => $field, 'image_style' => $type));
         }
         elseif (isset($attribute) && !empty($attribute) && isset($field[$attribute])) {
-          $output[] = $field[$attribute];
+          if (in_array($attribute, array("width", "height", "mimetype"))) {
+
+            $styled_uri = image_style_path($type, $field['uri']);
+            $style      = image_style_load($type);
+
+            // Imagecrop module support
+            global $imagecrop_style;
+            $imagecrop_style = $type;
+
+            image_style_create_derivative($style, $field["uri"], $styled_uri);
+
+            if (!$images_style_sizes[$styled_uri]) {
+              $images_style_sizes[$styled_uri] = image_get_info($styled_uri);
+            }
+
+            if ($images_style_sizes[$styled_uri][0] && $images_style_sizes[$styled_uri][1]) {
+              if ($attribute == "width") {
+                $output[] = $images_style_sizes[$styled_uri]["width"];
+              }
+              if ($attribute == "height") {
+                $output[] = $images_style_sizes[$styled_uri]["height"];
+              }
+              if ($attribute == "mimetype") {
+                $output[] = $images_style_sizes[$styled_uri]["mime_type"];
+              }
+            }
+          }
+          else {
+            $output[] = $field[$attribute];
+          }
         }
         else {
-          $uri = '';
-          if (!empty($field['uri'])) {
-            $uri = $field['uri'];
-          }
-          elseif ($file = file_load($field['fid'])) {
-            $uri = $file->uri;
-          }
-          $output[] = !empty($uri) ? image_style_url($token, $uri) : '';
+          $output[] = image_style_url($token, $field['uri']);
         }
       }
       $replacements[$original] = implode(', ', $output);
@@ -124,8 +148,9 @@ function _imagegecache_token_image_attributes() {
     'height' => NULL,
     'alt' => '',
     'title' => NULL,
+    'mimetype' => NULL,
     'attributes' => array(),
     'render' => '',
     'uri' => '',
- );
+  );
 }
