0

I don't find a script or tricks to do that, i would like to replace ALL images by other folder (with different images).

exemple: i made a template with 4 box who contain the same image : toto.jpg, toto.jpg, etc.. And i would like to replace by multiple different image of a folder.

If i do this by Import, i need to click manually on each images to replace... this is bad

4
  • If the images have the exact same names you can overwrite the linked files with new ones. If you want to relink all instances of an image with another it's possible in the links panel. Perhaps you could be a little more specific in what you are trying to achieve? – Wolff Mar 26 at 16:49
  • Are you looking for the Relink to folder option? That allows you to select any number of links in the Links panel, choose a different folder, and then it will look for identically named files for all the selected links to in that folder and relink all the ones it finds. – Janus Bahs Jacquet Mar 26 at 19:17
  • Regarding the latest info you added (as an answer, but I hope you'll edit your question and include it there). You say you want to relink one image with three images. I don't understand exactly what you mean by that. An image can only be relinked to one other image. Is something supposed to happen in between the relinking or is it because you have three instances of the same image which you want to replace with three individual images? Could you perhaps post a visual before and after example? – Wolff Mar 27 at 14:58
  • It’s still completely impossible to figure out what you’re actually looking for here. Your vague wording makes it a guessing game how many different images and folders you have, how many you want there to end up being, and what logic should be behind the relinking. As it stands, your question basically reads, “I have some linked images that I want to have automatically relinked; how do I do that?”, which is unanswerable. – Janus Bahs Jacquet May 2 at 20:20
0

InDesign will auto-grab links from a folder actually named "Links", which should exist next to the INDD source file.

So what you can do is to have different folders named "Links1", "Links2", "Links3", "Links4", and so on. Rename any of these folders to just "Links" and that should auto-update the InDesign linking.

Then go in the Links panel, select all of them and hit the Update button.

1
  • Thanks for answer, but that dont resolve the problem. i hve multiple box with the same image template like default.jpg. So the folder is Link1 > default.jpg. I would like to replace by folder Link2 > image1, image2,image3. I search a script or someting like that, if someone know ? – Kerinno Mar 27 at 12:44
0

It can be done via scripting, but why for? Just rename the folder Links1 to Links and reopen the document. Then, If you need, rename the folder Links back to Link1 and rename the folder Links2 to Links. And reopen your doc again. And so on.

The script does just the same thing:

Initial folders: Links, Links2, Links3, Links4

Run script 1: Links <-- former Links2, Links1 <-- former Links, Links3, Links4

Run script 2: Links <-- former Links3, Links1, Llinks2 <-- former Links, Links4

Run script 3: Links <-- former Links4, Links1, Links2, Links3 <-- former Links

Run script 4: Links <-- former Links1, Links2, Links3, Links4 <-- former Links

Etc

var doc = app.activeDocument;

var base_path   = doc.filePath;
var base_name   = "Links";
var base_folder = Folder(base_path + "/" + base_name);
var names       = ["Links1", "Links2", "Links3", "Links4"];

// circular check and renamimg folders
var i = 0
while (true) {
    var prev_folder = Folder(base_path + "/" + names[i]);
    if (!prev_folder.exists) {
        base_folder.rename(names[i]);
        if (i < names.length-1) i++; else i = 0;
        var next_name = names[i];
        var next_folder = Folder(base_path + "/" + next_name);
        next_folder.rename(base_name);
        break;
    }
    i++;
    if (i > names.length-1) break; // just in case
}

// update all links
for (var i=0; i<doc.links.length; i++) {
    if (doc.links[i].status == LinkStatus.linkOutOfDate) doc.links[i].update();
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.