Nicola Asuni - 2011-09-13

The current code sees working fine and the proposed patch doesn't have much sense, since the file_exists call is done to avoid calling getimagesize function for non existing file (this is required because getimagesize always trigger errors in this case).
If you are having problems loading the image, probably you have to install the php-curl extension or simply enabling getimagesize access to your server resources.