3
\$\begingroup\$

I am an older photographer with an ever-increasing collectiob of 20,000+ images in folders arranged by year and month. (they are currently catalogues in Lightroom and the bad, non-interesting photos have been culled out) Two of my children have expressed strong interest in having the photos as a history of my efforts in photography.

I don't want to require them to learn LR to view the pictures and would like to leave all the files in viewable size jpegs in the same named hierarchical structure as the LR database.

Lightroom just chokes on converting and resizing anything over 40 or 50 at a time. I'd prefer not to spend a month doing this.

Can anyone suggest a method to automate this?

\$\endgroup\$
5
  • \$\begingroup\$ I thought I understood your question, but now I'm doubting myself. When you mention same named hierarchical structure as the LR database, do you mean that you want to take into account the (sub)collections of LR? Or is it sufficient that your children can browse the year/month folders? If it's the latter, why is it not sufficient that you give a copy of the photos in the year/mont folders to your children? And now I'm writing this, I realise it's perhaps because the files are RAW instead of JPEGs. Is that the case? \$\endgroup\$ Aug 29, 2020 at 19:07
  • \$\begingroup\$ yes, they are raw & psd files. I don't want to do a lot of work that may be useless by converting them all in fullsize jpeg (and lose detail). I plan on exporting about 5000 in different collections as screen size jpegs and then giving them copies of catalogs and raw files. My latest plan is to use a publish plugin by jfriedl to publish the collections as jpegs to an external HD. I'll see how/if that works. I'm down to 22000 in total and about 5000 to be in jpegs. \$\endgroup\$ Aug 30, 2020 at 21:00
  • \$\begingroup\$ Thanks for getting back. That seems to be important information which I think is better to include in the original question (there's an edit button on the bottom). Regarding I don't want... that may be useless, useless in the sense that your kids won't have interest in all the photos? To me it seems it's straightforward: export all 20k+ images to JPG at quality 70-80 into year/month folders on an external HD. But I guess you've considered that and I'm missing something. Could you indicate why that approach would not work? \$\endgroup\$ Aug 30, 2020 at 21:11
  • \$\begingroup\$ Is it because LR on your machine get stuck on large exports? Is it because you feel JPG compression would not do the photos justice? \$\endgroup\$ Aug 30, 2020 at 21:13
  • \$\begingroup\$ I'm planning on exporting all the family photos and only a selection of the best travel photos. As it is I'm exporting 5,000+ photos and that's a lot of viewing. I haven't tried a 'big' export yet; I am nervous about it. They look great at screen size in screen size so that's not a problem. \$\endgroup\$ Sep 1, 2020 at 1:32

2 Answers 2

1
\$\begingroup\$

I can't stop recommending IrfanView if you use windows. Just be careful with the options you choose, specially Overwriting and deleting files, make some tests with dummy files and folders before running any batch script. Make a backup of your original files.

enter image description here

File > Batch Conversion / Rename

And in Advanced options, you can choose to create subfolders.

You can simply drag folders from the top preview window into the bottom list.

Irfan View recognizes a lot of file formats, and you can choose to export them all into jpg, define the quality of the files, apply some sharpening, etc.

\$\endgroup\$
6
  • \$\begingroup\$ A link to the program would be helpful as would any limitations such as supported OSs. \$\endgroup\$
    – Eric S
    Aug 29, 2020 at 1:05
  • \$\begingroup\$ Done. Link and OS. Thanks. \$\endgroup\$
    – Rafael
    Aug 29, 2020 at 16:11
  • \$\begingroup\$ But how will this take into account the same named hierarchical structure as the LR database? Is there an IrfanView plugin to read LR catalog data? \$\endgroup\$ Aug 29, 2020 at 19:03
  • \$\begingroup\$ Not the database, the folder structure yes. \$\endgroup\$
    – Rafael
    Aug 29, 2020 at 20:09
  • \$\begingroup\$ Ah ok. The OP now indicates that they need to convert RAW and PSD files to JPG. While I see IrfanView can read e.g. CR2, I'm not sure how it would read the adjustments from LR. Perhaps via the XMP files? \$\endgroup\$ Aug 31, 2020 at 10:47
0
\$\begingroup\$

If you have the technical skills to install Python3 and the Python Imaging Library on your computer, you can use this Python script:

# !/usr/bin/python3
import os
import sys
from PIL import Image

size = 128, 128

def thumbnail(fromFile,  toFile):
    _, ext = os.path.splitext(fromFile)
    if ext.lower() in ['.jpg', '.jpeg', '.png']:
      print('Creating thumbnail', toFile)
      im = Image.open(fromFile)
      im.thumbnail(size)
      im.save(file + ".thumbnail", "JPEG")

[_, fromDir, toDir] = sys.argv
for root, dirs, files in os.walk(fromDir, topdown=True):
   for name in dirs:
      toPath = os.path.join(toDir, root, name)
      print('Making', toPath)
      os.makedirs(toPath, 0o777, True)

   for name in files:
      fromFile = os.path.join(root, name)
      toFile = os.path.join(toDir, root, name)
      thumbnail(fromFile,  toFile)

Run it like this: python3 scriptname sourcedir destdir

Remember that sourcedir must be a relative pathname. If you have a file named /usr/traveler/mystuff/images/2009/Mar/IMG3.jpg, go to the directory /usr/traveler/mystuff, and use python3 scriptname images thumbnails, the output will be in /usr/traveler/mystuff/thumbnails/images/2009/Mar/IMG3.jpg

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.