How do I animate an image based on relative position in after effects?
You can move the anchor point of a layer, but this may upset scale, rotation or masking. There is a much simpler and very intuitive way to do it.

Click on the position property to select all keyframes. Park the playhead on one of these keyframes (use j or k keys to do this). Now if you move one of the keyframes they all move. If you don't park the playhead on an existing keyframe then you will just create a new keyframe at the current time and leave the others unchanged.


  Tip: If you need to have the playhead at a particular time to see the
  relative position and there is no keyframe there, just create a
  temporary one at the current time.