Many designers occasionally have the task to swap images. InDesign itself offers only basic support by moving frames or copy/pasting the frame contents. As usual life can get easier by script.
This script is written as startup script, meaning that you place it in "<application folder>/Scripts/Startup Scripts" and restart InDesign. After that you'll find three new entries in the context menu:
This takes a note of the filepath of both images and uses a simple place (as in File > Place that you would do manually) to move the images to the other frame. The result is dependant on the scale of the image previously inhabiting the frame and of that preference in the area "Filehandling", whether the scale or the size should be maintained.
The script simply remembers the coordinates indicated by the transform reference point of both frames and moves both frames to each others coordinates.
This "unloads" the frames and places the images into the place cursor so that you can decide at your leasure where to re-put them.
All three scripts are not yet heavily testet but should be undoable in any case. Feedback is welcome.