diff -b /home/steve/uc_affiliate2/uc_affiliate2.module /home/drupal_6/sites/all/modules/uc_affiliate2/uc_affiliate2.module
377c377,383
<       $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('uc_affiliate2_imagecache_preset_' . $user->uid, FALSE);
>         if ($preset) $imagecache_path = "/imagecache/$preset/";
>       }
>       $image = $GLOBALS['base_url'] .'/'. file_directory_path() . $imagecache_path . rawurlencode(basename($product->field_image_cache[0]['filepath']));
diff -b /home/steve/uc_affiliate2/uc_affiliate2.user.inc /home/drupal_6/sites/all/modules/uc_affiliate2/uc_affiliate2.user.inc
206a207,227
>   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['imagecache_preset'] = array(
>     '#title' => 'Image size',
>     '#description' => 'Select a preset size for the exported images.',
>     '#type' => 'select',
>     '#options' => $imagecache_options,
>   );
>   }
> 
230a252,256
>   // 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']);
>   }
>
