Hidden Lightroom Script To Recover Lost Photos | Huge Life Saver

Hidden Lightroom Script To Recover Lost Photos | Huge Life Saver

Let's imagine you've lost the drive that houses all of your RAW files for Lightroom. Let's also assume ninjas broke into your off site location and stole your backup. Let's even go so far as to say that hackers erased all of your images backed up in the cloud. If you've made previews there may still be one way to recover your work.

If worse comes to worse and your original RAW files were lost, stolen, or deleted, there is a script to extract the previews that you have made for each photo. This isn't something that comes native to Lightroom so follow the steps below. Through Adobe Lightroom Help, you can download and install a script to extract full size preview JPEG's of the files you've lost. While this isn't close to the elasticity of RAW file, it will assuage the pain of losing your original files and restore it with full resolution JPEGs if you've made 1:1 previews.

I make 1:1 previews of all files upon import. This gives me 100% of the pixels of my photos, which is the highest resolution of a preview possible.  This makes my culling process the fastest it could possibly be and allows me to quickly preview hundreds or thousands of photos without waiting for the preview to render. This could also help if Ninjas stole my RAW photos, which could happen. Below is a further explanation for all options for rendering previews if you are curious.

Use optimal settings in Lightroom | Previews Explained


Download Script Instructions To Extract Previews

The following is a step by step procedure taken from Adobe's Lightroom Help Page for installing the script to extract previews.

  1. Ctrl + click (Mac OS) or right-click (Windows) the link to the script below, and save the script to your desktop. Double-click the file to decompress it. This creates a file named ExtractPreviews.lua. If you can't locate this file, you can search your hard disk for it. Download: ExtractPreviews.lua.zip
  2. In Lightroom, choose Lightroom > Preferences (Mac OS) or Edit > Preferences (Windows).
  3. Choose the Preset tab and select Show Lightroom Presets folder}fstoppers_Adobe Extract Script Preset_GaryWMartin

    The Show Lightroom Presets Folder button takes you to the correct location only when Store Presets With Catalog is not selected. If Store Presets With Catalog is selected, navigate to and open the /Users/[user name]/Library/Application Support/Adobe/Lightroom folder. Important: Apple made the user library folder hidden by default with the 10.7 release. If it's necessary to access these files to perform Adobe-related troubleshooting, use this TechNote to open this folder.

  4. Create a folder in the Lightroom folder called Scripts.
  5. Copy the ExtractPreviews.lua script (from Step 1) into the Scripts folder.
  6. Quit and reopen Lightroom.
  7. In Lightroom, choose the ExtractPreviews from the Script menu.Note:In Windows, the script menu is the last menu on the right.In Mac OS, the script menu is to the right of the Help menu. See the following illustration. 

    fstoppers_Adobe Extract Script_GaryWMartin 

  8. Choose a location for your extracted previews.I hope you never have to use this feature to save your images but if you do, you'll be glad you made 1:1 previews.

Read the rest of my articles HERE.

Posted In: 
Log in or register to post comments


I guess this is only any good if the catalogue and images are on separate drives?


It's good if you've lost the master images for whatever reason. Looking at the thankful comments garnered by my Lightroom plugin that does this kind of image extraction (mentioned in another comment that may be slow to appear because it contains a link), it's all too common for someone to accidentally delete a folder of master image files.

Gary Martin's picture

Yes. It's good practice to backup your lightroom catalogue on a separate drive. I keep my catalogue on a SSD and back it up to a RAID 5 server. You can even sync your catalogue to backup to the cloud through Google Drive or even dropbox if you have the space...........I think we are all still waiting for the price of cloud storage to drop and for Google to invent wicked fast Internet speed for everyone for cheap

Another approach is my cache-extraction plugin (free) that not only extracts the images as the script does, but also preserves the filenames and reinjects basic metadata (shot date, exposure info, etc.) that is otherwise lost (because the preview-cache images have absolutely no metadata).


Just want to get this right. This script generates a files for every images that has a 1:1 preview? I would be more interested in extracting specific folder with all the files that are in that folder with a 1:1 preview. I tried but I'm not sure it was possible. Am I wrong?

Hi guys,
I accidentally deleted several hundred photos just last week while moving them to new external hard drive because I was in too big of a hurry, trying to multi-task several things at once and was just not paying attention to what I was deleting. Well, I was able to recover previews from almost 95% of all of them easily and without any trouble at all. But, I have always built standard previews and sometimes 1.1 in the past and never discarded any of the previews. I upgraded to LR5 about 6 months ago and decided that I would just build minimal previews on import because it is a little faster than 200 raw files and when I extracted those new previews, they are tiny, tiny little jpeg images that are worthless and I will still end up losing them unless you know of a way to resize a miniscule little jpeg into a larger quality image somehow?? But, I think I already know the answer to that question. So, I will now always build either standard or 1.1 previews upon import and never, ever delete or discard them no matter how big the preview folder gets! Thank you for covering this because I don't think a lot of people know you can recover previews from deleted files. I didn't and I have never seen anyone else blog about it myself. I just kept reading and researching until i happened to run across it somewhere and I've had LR for 4 years. I am just an avid amatuer hobbiest really but most everything I have learned is from visiting the websites of all the wonderful and knowledgeable bloggers like yourself so thank you!

I found all my deleted photos backed up in a new cloud service I just started and also on Google+ because I had auto backup set on. They were all my latest and newest files though and I didn't think that I had uploaded them anywhere yet. The cloud was good.

Thanks for this article. I recently lost a hard drive that had 10 years work of photos on it. Sent the drive off to get the data recovered with no luck. This preview extraction didn't recover everything in my situation, but it helped.

After copying ExtractPreviews.lua.zip from Desktop into created Lightroom Script folder and clicking on Scripts in Lightroom I get the error message:
Unexpected error performing command: [string"C:\Users\my name\AppData\Roaming\Adobe\Lightroom\Scripts\Extra..."]:1:'='expected near 'char(3)'

Does anyone know what I've done incorrectly and the fix? (I'm using PC)

please do you have a video tutorial to help do this rigth?

oh so i did this, it is great got most of my photos back however for some reason on one of my import files it only show a few previews, i imported them with 1.1 previews however lightroom is say its missing?? i have no idea what happened and i really need to get them back! is there a way?

Hi Gary,
I am attempting to recover photos from a crashed hard drive, however I did not render the previews before the hard drive crashed. Is there any way to recover the preview that I see in lightroom? Does lightroom automatically generate some form of a preview that I can recover?

Thank you,

Thank you so much for sharing this! I have experienced a external hard drive crash and this saved me!! I am so grateful!!!!