Loading image using javascript and timeout.

I have a scenario where I am trying to pre load image and then onload call rest of the javascript. I would like to define some timeout for that. I am not sure how much time browser wait for the image before it actually throws an error. But is there any way I can set a timeout and cancel the download?

Basically I am building a mobile app. It has list of players. You click on one page you get information about that player and image of that player but fetched from a third party rest service. I am using backbone. What is happening is user is able to see the text but image is loading really slow. So now I am trying to do something like this.

But I am not sure how much time browser waits for the image to get loaded. So I wanted to define my own timeout.