Skip to main content
dublove
Legend
Oct 30, 2026 6:38 AM UTC
Question

Is this the original aspect ratio of the image? How to obtain it?

Hello everyone.

I have been searching for the width to height (W/H) ratio of the image before it is deformed in InDesign.

Today, I suddenly discovered a genus named Dimensions,
Unless modified in Photoshop, this value will not change in Indeisgn, right?
I only found item.HorizontalLayoutConstraints in ExtendeScrip; I don't know how to use it.

How to obtain this value using a script?

Thank you.

 

    1 reply

    leo.r
    Community Expert
    Community Expert
    Oct 30, 2026 7:31 AM UTC

    I don’t think there’s a property to retrieve it directly (although I could be wrong, too). You’ll need to retrieve it from image metadata one way or another. InDesign offers some convoluted way to do this via LinkMetadata then getProperty (namespace: string, path: string); I don’t know if Extendscript offers access to easier ways of doing this. (In theory, you can also calculate pixel dimensions via physical dimensions and resolution, but I don’t think it’s the right way of doing this).

    It’s quite possible there are much easier ways to obtain this info that I’m missing, in which case I’m sure others will let us know.

    Translate