How do I set a product image?
$img_file = file_get_contents("Path/to/module/Images/image1.jpeg");
  $img_file = file_save_data($img_file, file_directory_path() .'/path2imagefield_folder/image1.jpeg', FILE_EXISTS_RENAME);
  $node-&gt;field_image_cache = array(
    array(
      'fid' =&gt; 'upload',
      'title' =&gt; basename($img_file),
      'filename' =&gt; basename($img_file),
      'filepath' =&gt; $img_file,
      'filesize' =&gt; filesize($img_file),
    ),
  );