Skip to main content
New Participant
August 15, 2019
Answered

Embedding images in many files

  • August 15, 2019
  • 6 replies
  • 1861 views

Hello everyone,

i want to embed the Images in around 500 InDesign Templates i have, to send each in one file with all the images included.

So i have 500 InDesign files where is all included.

There is no batch processing in Indesign i think and the Script i found, don't include the embedding of images.

If you have a solution for this problem, I would be very happy about an answer.

Thank you

Correct answer Sunil Yadav

You can try this code:

Where you have to select folder containing all the indesign files:

var myFolder = Folder.selectDialog ("Select Folder with all indd files");

var allINDDFiles = myFolder.getFiles("*.indd");//here you can change extension of you files ===

for(var i = 0; i < allINDDFiles.length; i++){

    try{

        var myDoc = app.open(allINDDFiles);

        myDoc.links.everyItem().unlink();

        myDoc.close(SaveOptions.YES);

        }

    catch(e){}

    }

Best

Sunil

6 replies

Sunil Yadav
Sunil YadavCorrect answer
Brainiac
August 17, 2019

You can try this code:

Where you have to select folder containing all the indesign files:

var myFolder = Folder.selectDialog ("Select Folder with all indd files");

var allINDDFiles = myFolder.getFiles("*.indd");//here you can change extension of you files ===

for(var i = 0; i < allINDDFiles.length; i++){

    try{

        var myDoc = app.open(allINDDFiles);

        myDoc.links.everyItem().unlink();

        myDoc.close(SaveOptions.YES);

        }

    catch(e){}

    }

Best

Sunil

AnneMarie Concepcion
Community Expert
August 15, 2019

I embed images all the time in InDesign files and <knock on wood> haven't had a file get corrupted from it ever. Many times it's the most convenient and sensible way to move layouts around, especially when sending to users not that familiar w/InDesign.

I think Colin Flashman's solution will work the best. I just tried that script in CC 2019 and it works fine.

AM

Participating Frequently
March 5, 2025

For me, it's "horses for courses". I find there are two workflows/situations where packaging is essential: (1) when sending your document to an external party (such as a design house, or a translation service); and (2), where the contents of the document would blow out the filesize if it was all embedded (for example, our brochures and other marketing collateral typically contain a number of large JPEGs).

 

But we also have workflows which deal with a lot of regulatory/legal documents which are text-heavy. These are instructions for use, product inserts, hazardous materials sheets etc. The only graphic content consists of a few logos, small icons and simple diagrams, all constructed as vectors. (Only our software user guide contains screenshots, as PNGs, but these are not large either.)

 

Our workflow requires us to store the documents on a server (SharePoint), and the documents are being constantly updated. Since InDesign doesn't like working over a network (not our network, anyway!), constantly zipping, packaging, unzipping and repackaging documents was a real pain. And when working on documents, it offered no real benefit.

 

Now, for those documents, we embed the graphics and store the InDesign files on the server. If we need to send a document to an external party, we unembed the graphics and make a zipped package, then reverse that process when the document is returned to us.

Participating Frequently
March 5, 2025

Oops! I couldn't find an Edit option...

The sentence And when working on documents, it offered no real benefit should read And when working on documents in house, it offered no real benefit.

Willi Adelberger
Community Expert
August 15, 2019

Embedding images is the prominent reason when I get corrupted files. I cannot recommend to embed any image into InDesign.

Joely10623436
Community Expert
August 15, 2019
Colin Flashman
Community Expert
August 15, 2019

I agree with Bob, but if your hand is forced and this is the way you have to do it, there is a script that will embed images in a file:

https://indesignsecrets.com/topic/automatically-embed-all-links-in-indesign

This will do one document at a time. However, combine this with Peter Kahrel's Batch Convert script and you could do it. Free script Batch convert/export InDesign documents | Peter Kahrel

You'd have all your ID files in one folder, run Peter's script, and convert from ID to an ID file, making sure to save changes on closing and to run the first script.

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
BobLevine
Community Expert
August 15, 2019

That is a horrible plan for anything other than the tiniest of images.

Instead, use the file > package command and then zip the package.

New Participant
August 15, 2019

Thank you for the response.

Each of the file has only two pages, so its not the size, thats okay.

But i need a baching process to make it for over 500 files. Do you have a solution for that?

Geоrge
Brainiac
August 15, 2019

Do a book, add all files without auto-numbering. Do package of the book.

Tips & Techniques: Packaging multiple files at once

Remember, never say you can't do something in InDesign, it's always just a question of finding the right workaround to get the job done. © David Blatner