Image preloader helper

Feel like this needs some tests, but I don't know how to test that a image is loaded... 
Right but what if it does have a src but that src 404s?