diff --git a/colorbox-insert-image.tpl.php b/colorbox-insert-image.tpl.php
index 93f9360..02a703f 100644
--- a/colorbox-insert-image.tpl.php
+++ b/colorbox-insert-image.tpl.php
@@ -8,7 +8,8 @@
  * - $item: The complete item being inserted.
  * - $image_path: The URL to the image.
  * - $link_path: The URL to the image that Colorbox should open.
- * - $style_name: The ImageCache preset being used.
+ * - $class: A set of classes assigned to this image (if any).
+ * - $style_name: The Image style being used.
  * - $gallery_id: The ID of the Colorbox gallery.
  *
  * Note that ALT and Title fields should not be filled in here, instead they
@@ -21,4 +22,4 @@
  * - __description__: A description of the image, sometimes used as a caption.
  */
 ?>
-<a href="<?php print $link_path; ?>" title="__title__" class="colorbox colorbox-insert-image" rel="<?php print $gallery_id; ?>"><img src="<?php print $image_path; ?>" alt="__alt__" title="__title__" class="imagecache imagecache-<?php print $style_name; ?>" /></a>
\ No newline at end of file
+<a href="<?php print $link_path; ?>" title="__title__" class="colorbox colorbox-insert-image" rel="<?php print $gallery_id; ?>"><img typeof="foaf:Image" src="<?php print $image_path; ?>" alt="__alt__" title="__title__" class="<?php print $class; ?>" /></a>
\ No newline at end of file
diff --git a/colorbox.module b/colorbox.module
index 06e935e..19606ce 100644
--- a/colorbox.module
+++ b/colorbox.module
@@ -446,5 +446,5 @@ function colorbox_insert_styles() {
  */
 function colorbox_insert_content($item, $style, $widget) {
   list($item['module_name'], $item['style_name']) = explode('__', $style['name'], 2);
-  return theme('colorbox_insert_image', $item, $widget);
+  return theme('colorbox_insert_image', array('item' => $item, 'widget' => $widget));
 }
diff --git a/colorbox.theme.inc b/colorbox.theme.inc
index 2420104..f4e68fa 100644
--- a/colorbox.theme.inc
+++ b/colorbox.theme.inc
@@ -116,16 +116,19 @@ function theme_colorbox_imagefield($variables) {
  * Preprocess variables for the colorbox-insert-image.tpl.php file.
  */
 function template_preprocess_colorbox_insert_image(&$variables) {
-  $variables['file'] = file_load($variables['fid']);
-  $variables['image_path'] = image_style_url($variables['style_name'], $variables['file']->uri);
+  $file = file_load($variables['item']['fid']);
+
+  $variables['image_path'] = image_style_url($variables['item']['style_name'], $file->uri);
 
   if ($style_name = variable_get('colorbox_image_style', '')) {
-    $variables['link_path'] = image_style_url($style_name, $variables['file']->uri);
+    $variables['link_path'] = image_style_url($style_name, $file->uri);
   }
   else {
-    $variables['link_path'] = file_create_url($variables['file']->uri);
+    $variables['link_path'] = file_create_url($file->uri);
   }
 
+  $variables['class'] = $variables['widget']['settings']['insert_class'];
+
   $variables['gallery_id'] = '';
   switch (variable_get('colorbox_insert_gallery', 0)) {
     case 0:
