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

Import a Folder Full of Pictures, One Per Page

In an earlier article, I wrote about how to import lots of images into InDesign at the same time. Later someone asked me how to import a folder of images so that each image shows up on a different page — much like the PDFplacer script (or PlaceMultiPagePDF.jsx script) splits up pages of a PDF so that each page shows up on its own InDesign page.

Here’s a pretty quick two-step process for how to import all a whole folder of images into InDesign quickly, using two features which sound advanced but are really pretty easy.


Before you start, though, you need to download and install a script called ImagesToCSV.jsx (written by Loic Aigon). If you don’t know how, then here’s how to install a script in InDesign.

Also, you should open a new InDesign document and create a graphic frame on the first page. This can be any size; it is the “template” into which all your images will get placed (one on each page). You might want to create and apply an object style to this frame in the Object Styles panel. (That way, you could edit that object style later and all the image frames throughout the document would get updated at the same time.)

1. Create the List of Images

When you double-click on the ImagesToCSV.jsx script inside the Scripts panel, it’ll ask you to select a folder. Navigate into the folder (so that you can see a grayed out list of the images you want to import) and then click the Open button. It will seem like nothing happened, but the script very quickly writes a csv file (“comma separated” text, similar to what you might export from Excel or a database) which contains a list of all the names of the files and their paths. The path describes where InDesign can find those images — what folder they’re in.

2. Import with Data Merge

Next, open the Data Merge panel (Window > Utilities > Data Merge), choose Select Data Source from the panel menu, and choose that CSV file (it’s in the same folder as the images you want to import).

Select the graphic frame you created on the page, and then click on the word “images” in the Data Merge panel. That tags the frame with that data “label.”

data merge with images

Finally, select Create Merged Document from the Data Merge panel menu (or click the button at the bottom right of the panel). The Create Merged Document dialog box lets you specify which images you want to import (for example, you might want to try importing just 10 out of 1000, just to make sure it’s working correctly).


If you click the Options tab, you can tell InDesign how to fit the images into the frame. If you want to ensure the image is completely visible on the page (so that no part gets cropped out), choose Fit Images Proportionally from the Fitting pop-up menu.


When you’re ready, click OK and InDesign creates a new document with the images!


This sounds like a long process, but believe me, after you do it once or twice it goes extremely quickly and you can import hundreds of images in less than a minute.

Of course, if you need labels with the images, you could use Data Merge for that, too, or (probably easier) use the Live Captions feature. Just set all that up in the original template document.

David Blatner

David Blatner

David Blatner is the co-founder of the Creative Publishing Network, InDesign Magazine, and the author or co-author of 15 books, including Real World InDesign. His InDesign videos at are among the most watched InDesign training in the world. You can find more about David at
David Blatner

Latest posts by David Blatner (see all)

  • - November 30, -0001
Related Articles

59 Comments on “Import a Folder Full of Pictures, One Per Page

    • Greg: Brilliant. Simple. Thank you!

      That said, the technique I discuss does have a couple of advantages: You can set an object style, the size and position of the frame, and add other elements on the page (text frames, background color, and so on).

  1. Great post, but I have a doubt… You said “InDesign creates a new document with the images”. It’s possible place images sequence in the same document? I am testing this tutorial with an archive of 300 pages/images, but It’s too slow… My aim is to apply the images in a document that already has others layers, is this the correct procedure? thank you!

    • Another problem is: when InDesign creates a new document, assigns it the default size. If, instead, as we wish, use the current document, so you can simply create a new document and run the script.
      To make sure that the script does not create a new document must change the line 237.
      Change line 237 of script (make a backup first, just in case)
      var myDocument = app.documents.add();
      var myDocument = app.documents[0];

      Personally I duplicated the script and changed the line. Now the modified script works as I want!

      • Thanks Carlo, I did this, but then I got an error on line 264. In order it worked, I had to replace “myNumberOfPages” by the actual number of pages that I needed.
        But I’d like to make it automatic (i.e. without having to modify the script each time I use it), and if you know how to do that, many thanks in advance !

      • Well, I put back “myNumberOfPages” on line 264 (instead of a fixed number) and now the modified script works well, no more reported error. Very weird… Sorry for my previous post and thanx again for the trick.

  2. Great tutorial!
    Is there a way when exporting jpegs of the different pages, to keep the original filename of the initial jpeg name?

    Example: I place the jpeg with name “test1.jpeg” on a page. Can I export it from indesign automatically as a jpeg with the name “test1.jpg?

    thanks in advance,T

  3. Is it possible to use a similar script to put unique text at the bottom of every spread? For example, I am creating a workbook and need to put a unique quote at the bottom of every page. I would like to create the text holder on the master page and data merge 100 unique quotes (from a CSV file) to the bottom of one page on every spread. Thanks!

    • Did you ever get a response?
      …or maybe you can help…I’m trying to copy/paste word into InDesign but through-text creates all new page run.

  4. This is tremendously helpful. I am having trouble repeating this process for a different set of pictures. That is, I have two directories of images and want to place correspond pairs on the same page. When I choose a new data source, the process replaces the previous pictures. Is there a way to assign different data sources to different frames?

    • Hi Reza,

      If I understand you correctly, you need to make sure you run the ImagesToCSV.jsx on both directories. This will generate (2) csv files with links for each image. Next you can use a txt editor to combine (copy/paste) the records you want to use in your merge into a new csv file. Finally, you use that new csv file to run your data merge.

      Hope that helps!


      • Works great, except I have a folder with 516 jpeg´s numbered 1-516.
        They need to be placed one on each page in sequence, but the .csv file won´t sort in the correct order. Like 399-400-4-401 and so on.
        Any clues as to fix it ? Thanks

  5. Thomas,

    What I find helpful is to number images as 001, 010 thru 516. As in File001, File010, thru, File516. By adding the extra zeros in front of the single and double digits numbers, you should be able to sort in the order you need.

    Hope that is helpful in your situation too.


    • I’ve been doing a lot of scanning lately, and need to change dozens/hundreds of file names – like changing scan0123.jpg to page-001.jpg etc.

      I found the program “Bulk Rename Utility” the most wonderful thing in the world for renaming files. It’s got so many options that you can do whatever your little heart desires.

    • Karlu,

      As far as I know this script works with any image recognized by InDesign. This includes .tif and .psd. Can you “Place” your image into InDesign?

  6. Works perfectly! Saved me many hours of boring manual labor.

    CS2 oddity – when you click on the text frame in Step 2 – you don’t get the word “images” just a dot in the middle of the text frame. Just continue on – it works fine.

    Thank You Very Much!

  7. CC2015 – YOSEMITE – This script only produces 1 line of the folder of images, and image 70 nonetheless.

    Tried back to CC14 and still no luck.

    • no luck here either. I tried placing 187 then down to 10 psd files and what it did was it created 5 open indesign files with one photo each on the first page…

  8. In my case I am already using data merge for other information, when you already have data merge source files brought in to your document you get a warning message when trying to select another source, that in may invalidate the current data merge source. I am planning to use the multipageimporter2.5jjb.jsx script found in another post ( by creating one .pdf of all my image files in acrobat. By doing so, you could avoid the data merge all together. All you need is acrobat pro. create, combine files into single .pdf. then use script.

  9. Thanx. This was exactly what I needed, but I am riddled with a strange phenomenon. I tried some image folders where it worked but strangely it does not work with a book I had photographed. They are all jpegs and nothing special but the script only creates empty frames. I tried it many times.. Has anyone experienced such a problem yet? Thank you very much for your support.

  10. Thanks for that awesome tutorial!
    I have the following problem with it: I have a document with two object frames on each page. The upper frame should show picture 001 to 070 (one on each page), the lower one picture 071 to 140. I can import the pictures in either the upper or the lower frame without any problems but if I try to add both in one document, it only inserts 1 picture and then stops.
    Any recomandations or work-around? Thanks!

  11. posted this earlier:
    “no luck here either. I tried placing 187 then down to 10 psd files and what it did was it created 5 open indesign files with one photo each on the first page…”

    now i tried it again only this time i created a new indesign document with a single page only. and it worked. the article mentioned: “Also, you should open a new InDesign document and create a graphic frame on the FIRST PAGE….” so i thought i should open a multiple page document.

  12. Hi, thanks for this, it works perfectly.
    Maybe you can help me with one thing though: I have facing pages, and the frame on each page should not be located in the same place (I mean, I have a differently placed frame in each page). If I select both frames, the data merge just repeats each image for both frames… Any ideas?

  13. You saved my day! i needed to make a batch of pages with bar-codes on them, and i had a folder with the bar codes as .png, and i didn’t have a clue how to make pages, so that every page has a separate code!

    Thanks a million, and keep it up!!!

    • Yes. Just layout your document with four graphic frames on a page. Then in Create Merged Document (Step 2), change Records Per Document Page to “Multiple Records”, and voila…

  14. So ive got everything working execept my image all import horizontally when they should be vertical. Ive tried changing the configuration in the original images but the final result in indesign is the same.

    • Hey Ted – did anyone ever answer you and/or did you ever find a way to fix your problem? I’m having the same issue…

    • Colin,

      Try hovering of the link and choose SaveAs instead of double-clicking on the link. When I use SaveAs I can choose were to save the file. However, when I click on this link the contents of the script is displayed on the screen. Please note, once you see the contents you can copy/paste into a Text editor of choice and SaveAs ImagestoCSV.jsx.

  15. When do you think indd will have ‘a batch-file’ option already embedded? I have CS6.
    This is my third attempt to d/l and set up the jsx file and import photos. But none of this works.
    A simple link to batch file a folder would be easier. as with cmd+d.
    I had to duplicate each frame then click.paste each photo into each frame.
    I also tried the object styles to add text, Nup.
    Master frame text didn’t work either.
    Will CS7 have it?

  16. this plugin is so handy!
    but does any of you experience any problem with the order of the pages? eventhough the name of the original files shouldn’t create any problem (image01, image02 and so on) the CSV file messes them up.

    Any ideas how to solve this?

    • I found out by myself, looks like a bug.
      If I work in a folder on the desktop I have no problem with the order of the pages.
      (I’ve literaly copy pasted the same files from a folder on the server to a folder on the desktop and it worked)

  17. Thanks, this is great! Now how can I make this work across spreads (as in one image per page, set up as spreads/facing pages) instead of creating one side of a double-page spread? My document is set up with facing pages, so I don’t know what the problem is… Thanks!

    • Doing Data Merge on facing pages is a real problem – Data Merge was designed to work on only 1 page (the right one). I came up with some fairly kludgy Scripts that solve the problem. You can check them out over here:

      I’ve several projects where ImagesToCSV saved me dozens of hours of work. Jqcky and Sol’s comments got me thinking – Javascript is the Duct Tape of the computer world. Can it solve this problem? My solutions are not terribly elegant, but hopefully they will save other folks some work. Dave

      • Hi Dave – just used your script for facing pages and it works well! One issue I’m having though is I need a slightly different image frame alignment for each side. I’m doing fit images proportionally, so the images don’t fill the entire frame, and on the verso side i want them to aligned upper left, and on the recto side, upper right. I set these alignments in the placeholder frames before doing the merge, but after doing merging, it shuffles the recto/verso pages when it recombines them after deleting duplicates, so many of the alignments are wrong. Any ideas how to remedy this?
        Thank you! other than that script works great – thanks so much!

      • Rosco,

        I can’t quite duplicate your alignment problem. I’m pretty sure that whatever you set on the DataMerge Options tab overrules whatever you set on the individual placeholders. I suggest playing around with the different settings on the DataMerge Options tab, and make sure “Center in Frame” is un-checked.

  18. Thanks, I will check it out!

    It’s just confusing because the script seems to only create right-hand pages (rectos) in the document but no versos…? Like they don’t show up in the pages panel, nor in the document, obviously.

    Anyhow, thanks, I will try your methods out. =]

Leave a Reply

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