Set canvas initial height and width depending on server response