Added bind to image load event so that the directive waits for the image to load before applying changes.