Modified Script Adds Captions From Clipboard to Images
Some of you may have experienced the LabelGraphics script that ships with InDesign. It’s a very cool script written by Olav Martin Kvern that lets you quickly create captions for all the images in your document. The captions can be based on each file’s name, file path, XMP description, or XMP author. (XMP is the metadata that you can store in images with Bridge or Photoshop.)
But as much as I like the metadata workflow, that’s not where most image captions live. Usually, someone has typed an image caption into an email, or a Word document, or some other place. How to get those captions in the right place? Fortunately, the scripts that come with InDesign are meant to be used as examples — starting points for modifications — and Steve Wareham (who you may recall wrote the great swatch-switcher script) rose to the challenge.
His new script, LabelGraphics_mod.jsx, adds a couple very useful features beyond automatically making a label text frame (and putting that text frame on a new layer named “labels”):
- An option to paste the current clipboard contents into the label frame (yay!)
- Automatically expanding the height of the clipboard to fit the caption
- It will work on one or more selected images, or (if no items are selected) it offers the option to create labels for all the images throughout a document
- You can change the fill color of the text frame it creates
Here’s a look at its new dialog box:
This is a great improvement, and a great hail of thanks goes out to Steve for his work. You can download the script by clicking on this link. We’d love to hear what you think of it!


nice one, many thanks
nice. I didn’t even know about the original version of this!
Wow! What timing – I was able to use this is a publication today. As always, David, your knowledge about ID is phenomenal. Thanks for sharing the wealth.
Label Graphic is a great script. This one is awesome! I could run it sometimes, but since some weeks ago, I have a problem with some scripts: they just don´t execute. I´ve not installed any extra plugin or anything in InDesign. The same scripts work well on other computers. Any suggestion?.
Some people find that when their scripts stop working, rebuilding their preferences seems to helps. See our Popular Posts/FAQ for more on how to do that.
Just tried the original sample script that ships with ID. I can’t get the ordinary version of LabelGraphics.applescript to work. I get an error message that the script doesn’t understand a command.
But when I use the contextual menu (installed by the second script) I can get it do work.
I love the idea of using the XMP data.
Also, the File Name in the LabelGraphics script is the Finder file name, not the File Title in the XMP data.
This works great. I wish I had looked ages ago. Didn’t even explore the scripts panel.
Now, I’ve had a close look a the script, and they all look very frightening to a non-scripter. So, how do you turn this into a context menu.
PS How, also, do you remove the labelmenu (original)? The Applescript removelabelmenu doesn’t remove the javascript one.