Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

Free InDesign Script to Export JPEGs at a Precise Size

InDesign has had the ability since at least CS2 to export pages to JPEG. But the JPEG Export dialog box only allows you to specify a resolution value in pixels per inch. But I often find that I need a JPEG at a specific pixel dimension, such as 1000 pixels wide.

I encountered this most recently when I needed to export JPEGs from InDesign layouts for use with Behance and Adobe Portfolio. When creating images to display your projects on Behance, you should create JPEGs no more than 1400px wide, or less if you want the image to appear smaller in your project display. I tired of hauling my InDesign pages into Photoshop to create JPEGs. So I created 3 scripts that make this really easy. You can download the (free!) scripts here.

There are 3 scripts:

Export to JPG – all pages.jsx
Export to JPG – page range.jsx
Export to JPG – selection.jsx

Each script asks you where to save the exported JPG, and then presents a dialog box that is just like InDesign’s File > Export dialog, except that it has fields for entering either a width or height value in pixels.

Screen Shot 2016-04-27 at 8.57.28 AM

By the way, you may have noticed the File > Share on Behance command in recent versions of InDesign, Illustrator, and Photoshop. That command creates JPEG images for you, and uploads them automatically to Behance. But, unfortunately it uploads the images as a Behance “Work in Progress,” not a Behance “Project.” And Behance has announced that the Work in Progress feature is going to be turned off this spring.

So at this point, if you want to publish your work on Behance, you will need to create images of your work manually, and this script will be a big help!

Keith Gilbert

Keith Gilbert

Keith Gilbert is a digital publishing consultant and educator, Adobe Certified Instructor, Adobe Community Professional, conference speaker, lynda.com author, and contributing writer for various publications. His work has taken him throughout North America, Africa, Europe, and Asia. During his 30 years as a consultant, his clients have included Adobe, Apple, Target, the United Nations, Best Buy, General Mills, Lands' End, and Medtronic. Follow him on Twitter @gilbertconsult and at blog.gilbertconsulting.com.
Keith Gilbert

Latest posts by Keith Gilbert (see all)

  • - November 30, -0001
Related Articles
Comments

10 Comments on “Free InDesign Script to Export JPEGs at a Precise Size

  1. I am have downloaded the “Export to JPG” script and when I run the script in Indesign, its works fine. The only problem is there is no option for defining the resolution while exporting the images. Its always export images with 11 pixels/inch.

    • The resolution in pixels per inch has no effect when it comes to web images. This script saves with a specific width in pixels instead, and is intended for web use.

      It is only if you need to output the files in print that you need a certain resolution in pixels per inch, and then you can use the regular export option.

      Also if someone tells you that you absolutely have to save the image in “72ppi” for web, they don´t know what they are talking about. It really has no effect at all. Only the actual size in pixels matters for web.

    • Sanjay, that is why I wrote this script! When you choose File > Export in InDesign, and choose JPEG as the format, that method allows you to specify the pixel/inch value, not a total pixel dimension value. Thinking in terms of pixels/inch is great for when that matters, such as for print output. But when creating an image for a web site or to submit to Behance or to use in an AEM Mobile browse page, you are concerned about the total dimensions, in pixels. In these situations the pixels/inch value doesn’t matter, only the total number of pixels wide or total number of pixels high. This script lets you specify those dimensions.

  2. Thank you for these scripts. I have been longing for this feature in InDesign for a long time!

    Sadly, I would have needed this script last friday, when I had to export web images from an InDesign-layout with 14 different language layers.

    What I ended up doing, as always, was exporting to 14 PDF files, open them in Photoshop, setting the exact size in the open-dialog, and the exporting for web.

    This script would have saved me some time.

    I have tried it, and it works flawlessly. Awsome!

  3. HALLELUJAH! Great work! Didn’t even know this is doable! I wondered why doesn’t support this since v1!

  4. Thanks so much! We need to create a jpeg of every book cover using a specific pixel dimension for use on the web. This will save a lot of time.

Leave a Reply

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