I'm using the this facebook service to return profile pictures.
<img src="http://graph.facebook.com/username/picture">
If the fb user did not set a profile picture, the service redirects to this facebook anonymous person image: http://static.ak.fbcdn.net/rsrc.php/v2/yo/r/UlIqmHJn-SK.gif
. I would like to avoid presenting those.
Is there a way, using javascript, to detect if the image returned is http://static.ak.fbcdn.net/rsrc.php/v2/yo/r/UlIqmHJn-SK.gif
. That address is from a CDN, so I wonder if we can just check the file size is <= 390B and mime-type is image/gif?
EDIT: Unfortunately the solutions involving only modern browsers (HTML5 and canvas) might not work for me since the requirement is that we still need to support back to ie7.