Hello I am having trouble deleting a user uploaded image after I am done with it. I need to be able to delete the image immediatly off my server as soon as the editing is done. heres my code $Img = ImageCreateFromJPEG($path); $cor = imagecolorallocate($Img, 154, 41 ,45); imagestring($Img, 2, 580, 550, $name,$cor); header('Content-type: image/jpeg'); imagejpeg($Img, NULL, 100); imagedestroy($Img); unlink($path); Code (markup): I believe it has something to do with the fact that I am reoutputting the image to browser, and therefore my unlink is useless. Is there a workaround?