Site logo

Place inline images and fit

Script for InDesign: written in 2021; version 2.0

This is a modification of the place inline images script which finds text between two @ characters – e.g. @Pencil.tif@ – and replaces it with the image that has the same name.
The original script was written by Peter Kahrel. I found it somewhere on the Adobe scripting forum and reworked it to my liking.

When you run the script, a dialog box appears where you can set the maximum dimensions of the images (in the current document measurement units) before placing them and fit the images using one of the following options:

Before

After

Next you have to choose a folder where the images to be placed are located:

If no images are found for some tags, they will be listed in the report created on the desktop:

You can undo/redo the whole script:

In this new version (2.0):

Important note: As I’ve already mentioned above, the script uses the current document measurement units. I usually work in millimeters. If you live on the other side of the pool and use, say, inches, the default 20 x 30 would be too much for you, I think, so change the defaults in line 182 to more reasonable values for the units you use, like so:


Or, make sure to set correct values on the first run: the script will remember them.

In the future, I’d like to make a version that applies object styles so the user could control much more parameters. However, I am very busy lately so can’t promise if/when I will be able to make it.

Click here to download the script.