diff --git a/colorbox.theme.inc b/colorbox.theme.inc
index d140488..a349e47 100644
--- a/colorbox.theme.inc
+++ b/colorbox.theme.inc
@@ -37,6 +37,7 @@ function theme_colorbox_image_formatter($variables) {
 
   switch ($settings['colorbox_caption']) {
      case 'auto':
+      $caption = $image['title'];
       // If the title is empty use alt or the node title in that order.
       if (empty($image['title'])) {
         if (!empty($image['alt'])) {
