I would like to mass export all linked images in a Indesign document using this script, its from this thread
var myDoc = app.activeDocument,
apis = myDoc.allPageItems, pageItem, fileName;
while ( pageItem = apis.pop() ) {
if ( !pageItem.graphics[0].isValid ){ continue;}
fileName = File ( pageItem.graphics[0].itemLink.filePath ).name;
fileName = fileName.replace( /\.[a-z]{2,4}$/i, '.jpg' );
app.jpegExportPreferences.exportResolution = 2400;
app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.MAXIMUM;
//give it a unique name
var myFile = new File ("C:/Users/RANFacistol-Mata/Desktop/Image Trial/"+ fileName);
pageItem.exportFile(ExportFormat.JPG, myFile);
}
When i use this script, it export the linked images in the ratio how its placed in Indesign.
Yet i want it to look like this, the original ratio of the image