uhh, maybe because you're making the image file's name like this?

PHP Code:
$imagename $memberid "_" $rand
//............
$newimage "pics/" $imagename
if YOU don't add the extension, it won't be there. you can use this:
PHP Code:
$file $_FILES['image_file']['tmp_name'];
$pos strrpos($file'.');
$extension substr($file$posstrlen($file) - $pos);

$imagename .= "{$memberid}_{$rand}{$extension}"