I would think the best place to create the thumbnail would in the attachment functions file, after it's moved to the correct location.
Look for this in attach_create_attachment() (include/attach/attach_func.php ~line 106)
if(!move_uploaded_file($tmp_name,$pun_config['attach_basefolder'].$pun_config['attach_subfolder'].'/'.$unique_name))
error('Unable to move file from: '.$tmp_name.' to '.$pun_config['attach_basefolder'].$pun_config['attach_subfolder'].'/'.$unique_name.'',__FILE__,__LINE__);
//return false;
if(strlen($mime)==0)
$mime = attach_create_mime(attach_find_extention($name));
// update the database with this info
$result = $db->query('INSERT INTO '.$db->prefix.'attach_2_files (owner,post_id,filename,extension,mime,location,size) VALUES (\''.$pun_user['id'].'\',\''.$post_id.'\',\''.$db->escape($name).'\',\''.attach_get_extension($name).'\',\''.$db->escape($mime).'\',\''.$db->escape($pun_config['attach_subfolder'].'/'.$unique_name).'\',\''.$size.'\')')or error('Unable to insert attachment record into database.',__FILE__,__LINE__,$db->error());
return true;
}
Adding it before the "return true;" would probably be the best place, it will only be created after the image/file has been uploaded correctly.
The file will be named: $pun_config['attach_basefolder'].$pun_config['attach_subfolder'].'/'.$unique_name
But I'll see if I make it possible for 1.3 to have this feature added 'afterwards'... as the mod will be rewritten... again