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

    Note:
    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.

Gary Winchester Martin's picture

Gary W. Martin is a commercial photography producer and founder of PRO EDU. His company creates documentary style Photography and Photoshop tutorials with some of the best photographer/instructors in the world. Gary has spent 20% of his life abroad and once made a monkey faint in Costa Rica. He speaks English and Romanian.

Log in or register to post comments
20 Comments

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

Yup!

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.

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).

http://regex.info/blog/lightroom-goodies/preview-extraction

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,
Megan

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

For the last four days I have been having nightmares. Lost more than 50,000 images with no way to recuperate them. Luckily my Lightroom Catalogue is on a separate disc than all my images. This did not bring back the full res files as stated but is an incredibly satisfying solution. I can't find the words to thank you for this post.

made an account just to comment here with gratitude -- THANK YOU so much for this fix!!

I'm guessing this only works if you are using the same catalog that the photos were on? I made a new catalog about two months ago and I can find the other catalog or any of the photos that were on it. Any suggestions?

I did this and the resolution on my photos are tiny, meaning they are practically useless, I can't edit them or print them. Is there a way to fix this? Can I extract the previews with bigger and better resolution? This is really important. Please.

I'm not sure what I'm doing wrong... All of the previous posts make me so hopeful but when I cntrl click (Mac) on the extract previews link it sends it to my downloads, when I try to open it this is the message I receive (pic attached) I also tried copying and pasting the link into the new scripts folder and nothing happened. No scripts tab when I reopened LR. Any further guidance would be so appreciated!!

***update - I downloaded a LUA that allows you to run and write LUA codes. I reopened the downloaded link and it still isn't working. I was hoping this would allow me to access whatever script that was contained in that link. This is not my forte.

Hello, I'm getting an error message (An error occurred. OSErr -10814) when I click "extract previews lua" in the Scripts menu.

Also, the scripts menu always appears in the top right corner of my screen next to the date and time, not next to Help when LR is open.

Any help?