diff --git a/uc_affiliate2.admin.inc b/uc_affiliate2.admin.inc
index a1d5dea..7f02672 100644
--- a/uc_affiliate2.admin.inc
+++ b/uc_affiliate2.admin.inc
@@ -305,6 +305,29 @@ function uc_affiliate2_admin_settings() {
     '#description' => t('Where in the order status(es) will the commissions be assigned.'),
     '#options' => $statuses,
   );
+
+  if (module_exists('imagecache')) {
+    $presets = imagecache_presets();
+    foreach ($presets as $preset) {
+      $details = '';
+      if (!empty($preset['actions'][0]['data']['width'])) $details = 'width: ' . $preset['actions'][0]['data']['width'];
+      if (!empty($preset['actions'][0]['data']['height'])) {
+        if (!empty($details)) $details .= ', ';
+        $details .= 'height: ' . $preset['actions'][0]['data']['height'];
+      }
+      if (!empty($details)) $details = " ($details)";
+      $name = $preset['presetname'] . $details;
+      $imagecache_options[$preset['presetname']] =  $name;
+    }
+    $form['affiliate_imagecache_preset'] = array(
+    '#title' => 'Image size',
+    '#description' => 'Select a preset size for images exported to HTML.',
+    '#type' => 'select',
+    '#options' => $imagecache_options,
+    '#default_value' => variable_get('affiliate_imagecache_preset', FALSE),
+    );
+  }
+  
   $form['affiliate_invalid_redirect'] = array(
     '#type' => 'textfield',
     '#title' => t('On an invalid affiliate URL, redirect to'),
diff --git a/uc_affiliate2.module b/uc_affiliate2.module
index eeb495f..057dac4 100644
--- a/uc_affiliate2.module
+++ b/uc_affiliate2.module
@@ -374,7 +374,13 @@ function _uc_affiliate2_get_products($mode, $show = array()) {
       $image = 'N/A';
     }
     else {
-      $image = $GLOBALS['base_url'] .'/'. file_directory_path() .'/'. rawurlencode(basename($product->field_image_cache[0]['filepath']));
+      // imagecache preset?
+      $imagecache_path = '/';
+      if (module_exists('imagecache')) {
+        $preset = variable_get('affiliate_imagecache_preset', FALSE);
+        if ($preset) $imagecache_path = "/imagecache/$preset/";
+      }
+      $image = $GLOBALS['base_url'] .'/'. file_directory_path() . $imagecache_path . rawurlencode(basename($product->field_image_cache[0]['filepath']));
     }
 
     $title = check_plain($product->title);
diff --git a/uc_affiliate2.user.inc b/uc_affiliate2.user.inc
index e5f332b..2d64d90 100644
--- a/uc_affiliate2.user.inc
+++ b/uc_affiliate2.user.inc
@@ -227,8 +227,13 @@ function _uc_affiliate2_product_form_submit($form, &$form_state) {
   global $user;
 
   $show_these = array();
+ 
+   // save image preset
+  if (module_exists('imagecache') && !empty($form_state['values']['imagecache_preset'])) {
+    variable_set('uc_affiliate2_imagecache_preset_' . $user->uid, $form_state['values']['imagecache_preset']);
+  }
 
-  // build the filter array for _uc_affiliate2_get_products from the form checkboxes
+ // build the filter array for _uc_affiliate2_get_products from the form checkboxes
   foreach ($form_state['values']['products'] as $product_id => $status) {
     if ($status !== 0) {
       $show_these[] = $product_id;
