A milking robot (10) for teat cup attachment comprises a robot arm (11) having a gripper (12) for holding at least one teat cup (13) at a time an image recording device (14) mounted on the robot arm and provided to record at least one image of the teats (15a) of a milking animal (15) and a control device (16) provided to control the robot arm to position the teat cup at a teat of the milking animal based on the at least one image of her teats. The image recording device is, before being provided to record the at least one image of the teats of the milking animal, provided to record at least one image of her hind legs (15b) and the control device is, before being provided to control the robot arm to attach the teat cup to the teat of the milking animal, provided to control the robot arm to move the teat cup between her hind legs, from her rear (15c) and towards her udder (15d), based on the at least one image of her hind legs. The milking robot comprises means (17) for pivoting the image recording device with respect to the gripper of the robot arm between the recording of the at least one image of the hind legs of the milking animal and the recording of the at least one image of her teats.