Did you try to url encode the value in the src
-attribute of your image tag? (I find this link useful for a quick check: http://www.w3schools.com/tags/ref_urlencode.asp)
Like when your image filename is
<img src="spaces and + sign in url.jpg" />
you would encode it with
<img src="spaces+and+%2B+sign+in+url.jpg" />