Yes, it needs to be a blocking call because the 'load' event will be fired immediately after setImage() is called.