Imaging missiles typically have the sensor mounted on a gimbal so the target can be centered in the image even when the missile body is not pointed at the target. But yes, the line-of-sight to the target will generally be off of the missile boresight.