check if image is loaded successfully