Members Only

Script of the Month: Export for Web

This month’s script can be used to export any InDesign content as images for the web, in the sizes and formats you need.

This article appears in Issue 146 of InDesign Magazine.

As someone who routinely takes content out of InDesign and reformats it for the web, I am an avid user of this month’s Script of the Month. Another product of Keith Gilbert’s amazing mind, it has the potential to save you vast amounts of time and effort by automating the process of exporting any set of graphics from InDesign to the sizes and image file formats you need. 

How It Works

The script makes use of the Articles panel to define which items are exported and the file formats they’re exported to. When you first run the script, it creates two articles: one called jpg and another called png. Then you simply drag items into the article that corresponds to the file format you want (Figure 1).

Figure 1. Drag items into the Articles panel to add them to the set of exported images.

The best part is that you’re not limited to exporting simple placed images. You can export groups of images, native InDesign objects, and even text frames! Any formatting you applied in InDesign will be preserved in the export, including all transformations, strokes and fills, rounded corners, transparency, blend modes, shadows—you name it. 

Once everything is in place in the Articles panel, re-run the script to get your exports. You’ll find folders for each export size and format inside the same folder as the InDesign file.

By default, images will be exported as 150, 300, 900, and 1200 pixels wide. Need different sizes? Open the script with a text editor and change the values on lines 9–16 (Figure 2). Change the width value to zero to skip a particular export. 

Figure 2. Changing the export sizes is easy.

You can grab the Export Images for Web script here. 

Bookmark
Please login to bookmark Close

Not a member yet?

Get unlimited access to articles and member-only resources with a CreativePro membership.

Become a Member

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *