Skip to main content
New Participant
December 23, 2009
Question

Convert embedded image to a linked

  • December 23, 2009
  • 4 replies
  • 29689 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
    December 24, 2009

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

    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

    New 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

    Inspiring
    December 23, 2009

    An image pasted from Photoshop, at least on Windows, IS, most emphatically, not full resolution (though as I recall, the Info panel erroneously reports the resolution of the original). I believe the problem exists on Mac as well, thought he info panel may behave differently. I can't speak about other sources because I don't paste images and haven't tested.

    I've attached a PDF of a demonstration file I made for my classes.


    Just did a paste vs. place test and exported to PDF (on a mac). Images are same resolution in Acrobat, 300 PPI. Since the placed image was RGB they look identical in the PDF.

    (Side note for color management nerds – if you paste a grayscale image, the result is the same as assigning Gray Gamma 2.2 profile in Photoshop, then converting to the InDesign document RGB color space. ID has no gray color management and defaults to Gray Gamma 2.2)

    My big question is, why in the world don't the pasted images show up in the Links panel? I never paste images myself but I come across pasted images all the time. It would be ideal if InDesign showed them as embedded links, instead of letting them float on the page without any identification.

    I really like the script posted earlier but I wish it saved out the images as TIFF instead of JPEG.

    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
    December 23, 2009

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