You will have to monitor the loading of the image and scale it once it has been initialized. Width and height properties of the image are not ready before that.