Is this file image upload safe?
It is pretty solid for saving images on a single web server. Some optional/extra things you could do are:


Host the images on a CDN. That way if there was any PHP or JS injected in, it would not be able to access any cookies or directories on the web server you use to serve content.
Your code would block out PHP files in disguise from being uploaded because of the getimagesize() and the exif_imagetype(). You can add this bit to an htaccess file in the images directory as well to disable PHP files from being executed on their own. This wouldn't stop the file from being executed though if your code automatically included the "image" in the code somewhere.

&lt;IfModule mod_php5.c&gt;
php_flag engine off
&lt;/IfModule&gt;