Skip to main content
Participant
December 23, 2009
Question

Convert embedded image to a linked

  • December 23, 2009
  • 4 replies
  • 29710 views

I have a large file, with hundreds of embedded images.  Is there a way to make each export into its own file so that they are all linked, and therefore the file is much smaller and more manageable?

    4 replies

    Peter Spier
    Community Expert
    Community Expert
    December 24, 2009

    Pasting a previously placed image would give you full res -- in essence you are pasting the pointer to the image...

    Peter Kahrel
    Community Expert
    Community Expert
    December 23, 2009

    Bob's method is better if you can see filenames in the Links panel. But if you can't see any links, which is usually the case when images had been pasted into InDesign, then the script can be used.

    Peter

    Participant
    December 23, 2009

    Sorry to be a pest... how exactly do I run that?  I've only scripted in non-adobe programs; Rhino 3D and AutoCAD

    BobLevine
    Community Expert
    Community Expert
    December 23, 2009

    If there are no links in the panel, then all you'll have is very low res preview images. Turning those into links will do nothing to improve the quality.

    Bob

    Peter Kahrel
    Community Expert
    Community Expert
    December 23, 2009

    I use the script listed below for that.

    Peter

    // Unembed images without links: write them to disk and create a link
    // Images are saved as JPEGs in the document's folder using the name
    // "unembedded_" followed by a sequential number

    try {unembed_images ()}
        catch (e) {alert (e.message + "\r(line " + e.line + ")")};

    function unembed_images ()
        {
        // Alternative: baselineEncoding
        app.jpegExportPreferences.jpegRenderingStyle =  JPEGOptionsFormat.progressiveEncoding;
        // Options: maximum, high, medium, low
        app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.maximum;
        // Any resolution
        app.jpegExportPreferences.resolution = 300;
        var output_folder = String (app.documents[0].filePath);
        var g = app.documents[0].allGraphics;
        for (var i = 0; i < g.length; i++)
            {
            if (g.itemLink == null)
                {
                var image = File (output_folder + "/unembedded_" + String (i) + ".jpg");
                g.exportFile (ExportFormat.jpg, image);
                g.parent.place (image);
                }
            }
        }
    schroef
    Inspiring
    January 5, 2021

    @Peter Kahrel 

    Found this repo of scripts of yours and the dumb-pasted-images.jsx works fine. Atleast when you add AI in the dropdown. The EPS failed and returned java error. I tried copy/paste to photoshop and noticed they were placed vectors. Knowing this is simply added AI in the dropdown and it works liek a champ

     

    here' you can find that script if other needs it. He has many very usefull scripts. In line 81 add AI before or after EPS and try the script again.

    https://creativepro.com/files/kahrel/indesign/unembed_images.html

    BobLevine
    Community Expert
    Community Expert
    December 23, 2009

    Select the links in the links panel and from the links panel menu select unembed link.