I just had the same requirement to export not once, but 4 times (a large photo, a medium sized photo, a small photo, and a thumbnail) and there is a way. However, it needs a little bit of Windows Batch (or iOS shell if you are a Mac user) coding.
How my export workflow looks like:
- I export my photo(s) with Lightroom using a predefined export (as usual).
- This export runs a Batch file just after export.
- This Batch file creates several new files from the exported file (in my case I resize the photo several times)
What you need:
What to do:
- Install ImageMagick and be sure it's in your PATH.
- Find your Lightroom Export Actions folder. In Windows it's located in
C:\Users\YourUserName\AppData\Roaming\Adobe\Lightroom\Export Actions
- Create a new file there an name it
Create Export Files.bat
or whatever you prefer and fill it with the following code (this creates the files mentioned above and deletes the Lightroom export):
@echo off
SETLOCAL EnableDelayedExpansion
echo running...
cd
:loop
if "%1" == "" goto endloop
echo Processing %1...
if exist %1 (
set FILE=%1
set BASENAME=""
for /F %%i in ("!FILE!") do set BASENAME=%%~dpni
echo !BASENAME!
convert -quality 60 -resize x75 -unsharp 1x1.0+0.5+0 -strip !FILE! !BASENAME!$thumb.jpg
convert -quality 70 -resize 900x600 !FILE! !BASENAME!$900x600.jpg
convert -quality 70 -resize 1350x900 !FILE! !BASENAME!$1350x900.jpg
convert -quality 70 !FILE! !BASENAME!$1800x1200.jpg
del !FILE!
)
shift
goto loop
:endloop
echo done.
ENDLOCAL
- Open the Lightroom export dialog and prepare your export as you like. I chose an image size of 1800x1200 pixel (the size of my "large" photo) and a quality of 100 % (to let ImageMagick work with the best quality, it will be reduced later by ImageMagick).
- At the end of the dialog you find a point "Post-Processing" and a label "After Export". Within this box you'll find your "Create Export Files" script (or whatever you named it). Select it. Now this script will be run after Lightroom exported your files.
- Save the export and run it.
Even if you know a bit Windows Batch, you might wonder why SETLOCAL EnableDelayedExpansion
and !FILE!
instead of %FILE%
. See here for more information.
Update:
As of version 7 ImageMagick renamed its convert
program to magick
. So if you use a current ImageMagic installation you may either tick the Install legacy components checkbox during install or modify the script to use magick
instead of convert
.