use
imagecopyresampled($copy,$orig,0,0,0,0,$newWidth,$newHeight,$oldWidth,$oldHeight)
. Put that with the script that moves the images from the temp folder. ($copy is the path to the new pic made with imagecreatefromjpeg/gif/png()) This changes it on upload. Then you can either keep or delete the original. You can always just use the path to the temp folder as $orig, and not need to worry about deleting or moving the original image. Hope that helps!