Adding substitution for when the images are not available

Hello, thank you for making this great plugin. I was using it for a project yesterday. My project uses images hosted in another location and when one of them is not available, this plugin just showed nothing. I spent hours finding out what was wrong and thank God I found it. Hence I made this little modification so others will not have to face the same problem.