Wait for image to load before saving