This was an odd one. Never bumped into this thing before. Seems like a bug to me.
It doesn't matter if Indesign window is active of not. It's actually about some weird thing with the alt
click replace method.
There are 4 different ways to replace images ( if you don't count scripting ):
- Drag and drop 1 file from
Finder
to Indesign image
- Select 1 image in Indesign and
File > Place...
Cmd + D
1 image file and check: Replace Selected Item
.
- In the
Window > Links
panel: Right-click + Relink...`
These three function exactly the same. They retain the scaling and you can only use them with one image at a time.
- Load one or more items to the
place cursor
and press Alt
when clicking. This replaces the I'mage, but for what ever reason, it will get rid of the scale transformation.
I'm pretty sure this is a bug. I can't think of a reason why this would act differently.
Image example, where I'm replacing multiple images with the alt
click method:
Note that I'm replacing them with the same images, so that it's more apparent that the size changes.
I created this grid of images by irst making 4 graphic frames and then I placed the images with place cursor
by clicking on each frame and finally I manually resized each image. I did it like that, because this way the alt
click method starts working differently, compared to the three other methods.

I did some testing...
Turns out that if you place the original image ( the image you want to replace ) by clicking and dragging, the alt
click method will retain scaling. It makes sense, because when you place image like that, the Graphic frame
automatically gets frame fitting: Fit proportionally
.
As it turns out, if you select the graphic frame and turn ON auto-fit
...or even turn it ON and then turn it OFF, this makes the alt
click method work as expected.
I ended up making this script that will go through every single image, and if the image gaphic frame doesn't have auto-fit
ON, it will turn it ON and then immediately back OFF.
It will not ignore locked layers.
var doc = app.activeDocument;
var graphics = doc.allGraphics;
for ( var i=0; i < graphics.length; i++ ) {
var graphicFrame = graphics[i].parent;
if ( !graphicFrame.frameFittingOptions.autoFit ) {
graphicFrame.frameFittingOptions.autoFit = true;
graphicFrame.frameFittingOptions.autoFit = false;
}
}
alert( 'Done.' );
Image example, where I'm again, using the alt
click method, but this time after running the script:
Note that I'm replacing them with the same images, so that it's more apparent that they don't change size.
