? .thickbox.module.swp
? thickbox-derivative.patch
Index: thickbox.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/thickbox/thickbox.module,v
retrieving revision 1.8
diff -u -r1.8 thickbox.module
--- thickbox.module	26 Dec 2006 20:02:03 -0000	1.8
+++ thickbox.module	16 Jan 2007 11:23:09 -0000
@@ -23,6 +23,19 @@
     '#description' => t('Automaticly activate Thickbox for all image nodes.'),
   );
 
+  $options = array();
+  $sizes = _image_get_sizes();
+  foreach ($sizes as $size) {
+    $options[$size['label']] = $size['label'];
+  }
+  $form['thickbox_options']['thickbox_derivative'] = array(
+    '#type' => 'select',
+    '#title' => t('Image derivative'),
+    '#options' => $options,
+    '#default_value' => variable_get('thickbox_derivative', 'preview'),
+    '#description' => t('Select which image derivative will be loaded.'),
+  );
+
   return system_settings_form($form);
 }
 
@@ -48,6 +61,7 @@
       drupal_add_css($path .'/thickbox.css');
       drupal_add_js($path . '/thickbox.js');
       if (variable_get('thickbox_auto', 0) && module_exists('image')) {
+        drupal_add_js("var thickbox_derivative = " . drupal_to_js(variable_get('thickbox_derivative', 'preview')) . ";", 'inline');
         drupal_add_js($path . '/thickbox_auto.js');
       }
     }
Index: thickbox_auto.js
===================================================================
RCS file: /cvs/drupal/contributions/modules/thickbox/thickbox_auto.js,v
retrieving revision 1.1
diff -u -r1.1 thickbox_auto.js
--- thickbox_auto.js	9 Oct 2006 07:14:48 -0000	1.1
+++ thickbox_auto.js	16 Jan 2007 11:23:09 -0000
@@ -12,10 +12,10 @@
 function TB_drupal_init() {
   var i = $(this).children("img");
   var t = i.title() || i.attr("alt") || null;
-  var u = i.src().replace(".thumbnail","");
+  var u = i.src().replace(".thumbnail", "." + thickbox_derivative);
   var g = null; //not yet supported, would require the rewrite
 
   TB_show(t,u,g);
   this.blur();
   return false;
-}
\ No newline at end of file
+}
