Call a callback when an image has loaded