Reject image promise on error and add onload handler for none file urls.

We should reject with a *javax/microedition/media/MediaException* Java exception