There is image upload function in web application. After image is uploaded, it's resized using functions from PHP GD like imagecopyresampled
and others. Before invocation of PHP GD's functions there is no special validation that this image is of valid type. Then this resized image is put into directory at web server. When user requests certain url, this image is presented to him.
Is it safe to invoke PHP GD functions if you don't know whether file is a valid image?