', '/'.sfConfig::get('sf_upload_dir_name').$outfile); } $infile = '/products/'.$id.'.jpg'; if (!file_exists(sfConfig::get('sf_upload_dir').$infile)) { return; } // Retrieve the name of the uploaded file $thumbnail = new sfThumbnail($width, $height); $thumbnail->loadFile(sfConfig::get('sf_upload_dir').$infile); $thumbnail->save(sfConfig::get('sf_upload_dir').$outfile, 'image/jpeg'); return sprintf('', '/'.sfConfig::get('sf_upload_dir_name').$outfile); }