Remove all missing links in InDesign with this awesome script

2 min read
The ultimate script to remove all missing links in InDesign

Sometimes you have the pleasure to work with InDesign files that are over 600 pages long and that have a lot of missing images.

My designer colleagues tried to remove them one by one manually.

Luckily if you know how to script, you won't have to do manual work if you're clever enough. At least most of the time.

Save the following code as a .jsx file and run it in ExtendScript on Adobe InDesign. I work with CS6 but it should work anywhere.

// Removes all missing images in the active document.
// Keeps the frames.
 
if (app.documents.length == 0)
  alert('No documents are open. Please open a document and try again.')
var doc = app.activeDocument
var links = doc.links
 
for (var i = 0; i < links.length; i++) {
  if (links[i].status == LinkStatus.LINK_MISSING) {
    links[i].parent.remove()
  }
}
Missing images in InDesign popup

See what horror I'd have to go through if I wasn't able to make this script? I know this is not always a good solution in many environments.

But it worked for me and the code is simple enough that you would be able to adapt it to your own use case. It's a good starting point.

Oh, it removes all the missing links and keeps the frames. So keep that in mind.

Figma
Use Figma to create beautiful designs

5

Figma, a cloud-based design tool, allows designers to start and complete projects collaboratively in real-time. Its features can help you leverage the Ovsiankina Effect in your design process.

We earn a commission if you make a purchase, at no additional cost to you.

Ilias is a SEO entrepreneur and marketing agency owner at MagicSpace SEO, helping small businesses grow with SEO. With a decade of experience as a CTO and marketer, he offers SEO consulting and SEO services to clients worldwide.

Exclusive offers

The best deals for makers and creators.

Best AI headshot generator
Get AI-generated headshots for you and your team.
Get AI Headshots
MagicBuddy
Get 10 free credits for MagicBuddy, the AI chatbot for Telegram.
Chat Now
OG Image Generator
Just copy & paste the source code & never worry about OG images again.
Get Lifetime deal
Xnapper
Screenshot tool for Mac. Take screenshots, annotate, and share them.
Get Lifetime deal