here you go, you still need to select the clipped images (the images themselves, not the mask). You can do that with the group selection tool
//#target Illustrator
// script.name = relinkAllSelected.jsx;
// script.description = relinks all selected placed images at once;
// script.required = select at least one linked image before running;
// script.parent = CarlosCanto // 7/12/11; 05/12/19 updated for CC2019
// script.elegant = false;
var idoc = app.activeDocument;
sel = idoc.selection;
if (sel.length>0) {
var file = File.openDialog ("open file");
file = new File(file.fsName.replace("file://","")); // Mac OS Lion fix by John Hawkinson
for (i=0 ; i<sel.length ; i++ ) {
if (sel[i].typename == "PlacedItem") {
var iplaced = sel[i];
iplaced.file = file;
}
if (sel[i].typename == "RasterItem") {
var iplaced = idoc.placedItems.add();
iplaced.file = file;
iplaced.move(sel[i], ElementPlacement.PLACEBEFORE);
h = sel[i].height;
w = sel[i].width;
x2 = sel[i].left;
y2 = sel[i].top;
iplaced.position = [x2+w/2-iplaced.width/2, y2-h/2+iplaced.height/2];
sel[i].remove();
}
}
}
else
{
alert("select at least one placed item before running");
}