Change this to test the src attribute rather than testing for the presence of the Image object.