handle failed to load resource error on image load