LR010 - LR Classic, how to remove redundant JPG's
HOW TO REMOVE JPG’S FROM LR IF YOU IMPORTED RAW+JPG
In Lightroom, the default setting for situations where there is both a JPG and RAW version of the same image in a folder (or on the card) being imported is to treat the pair is if they were one image. In other words, you will only get one image in the grid or film strip but LR will know that it relates to two physical files. This feature can be turned off with a check box in the General tab of the Preferences panel. Check the box to treat these pairs as individual images.
Shooting both JPG and RAW simultaneously is often done by people when they first want to see what all the hoopla around RAW is about. However, moving cold turkey from JPG to RAW is somewhat scary and uncertain and people justifiably don’t want to risk losing images. So they set their camera to shoot RAW+JPG just so they’ll have some RAW images to try out but still have the JPG’s they are used to. Other people shoot RAW+JPG so they can share or print images right out of the camera without having to process them first in some computer but still have all the benefits of RAW files for the more serious work.
In many cases, there comes a time when the photographer switches their camera to RAW only. Later, perhaps when a disk drive gets full, the photographer decides that all those old JPG’s are just cluttering up their computer and they would like to get rid of them. Unfortunately, there is no button in LR that will do this. But, all is not lost. There is a way to get rid of those pesky JPG’s without confusing LR which thinks the JPG should be there.
But it’s not as simple as just deleting all the JPG’s in a folder and telling LR to synchronize the folder with the LR Catalog because in real life it’s not always certain that each and every JPG has a corresponding RAW file. What we want to do is to assure we ONLY get rid of JPG’s for which there is also a RAW version and that is where the complexity comes in.
If you are absolutely certain that in a specific folder, you only have RAW and JPG image pairs and every single JPG has a corresponding RAW file, then just go into Windows file Manger or Mac Finder, delete all the JPG’s in that folder and then go into LR and Synchronize the folder (Win: Right click on folder name and select Synchronize, Mac: Ctrl+Click the folder name and select Synchronize). Then ignore the rest of this blog.
Where you are not certain, there are 5 cases we need to consider.
Case 1 is where there is both a JPG and RAW version of the same image and both are known to Lightroom as a pair. For these images we wish to get rid of the JPG but leave the RAW.
Case 2 is where there is ONLY a single file on disk for an image of any file type (JPG, RAW, PSD, TIFF, Etc.) and Lightroom knows about it. For example a random photo you took with your phone instead of your DSLR or images you sent to Photoshop for editing and have come back to Lightroom. For these images you don’t want to get rid of any of them as they are the only version you have.
Case 3 is where LR expects there to be a RAW and a JPG, yet on disk there is only the RAW file. In other words something renamed, moved, or deleted the JPG on disk after the pair was imported into LR. In this case we want to leave the RAW file on disk but convince Lr that there is no corresponding JPG. If a corresponding JPG is later found, it can be deleted at that time.
Case 4 is where LR expects there to be a RAW and a JPG, yet on disk there is only the JPG file. In other words something renamed, moved or deleted the RAW file on disk after the pair was imported into LR. In this case we need to keep the JPG and get LR to understand that there is only a JPG and not a JPG+RAW pair.
Case 5 is where there are files in the folder that are not known to Lightroom. For those that are images you may want to get them into Lightroom or not. There may also be files that are not images at all such as text documents or other things. Mostly these would be left as is but you’d be surprised at some of the things you find.
Case 6 is where LR thinks there is an image file (or pair of image files), yet there is no file or files where LR thinks they should be. In other words the files are missing. In this case we need to either locate the files and tell LR where they are or remove the entry for that file (or files) from LR. This is standard "Locate Missing files" or "Locate Missing folders" operations in LR and are not covered in this blog.
In addition to these situations, and depending on how you have Lightroom set up, you may also have XMP Side Car files for some or all of the images.
NOTE 1: In the following steps, I’m assuming you will do this one folder at a time.
NOTE 2: To assure that we are working with all the files in a folder, one should expand all stacks in the folder and turn off all filters before you do any of the steps below.
NOTE 3: In the text, when I mention RAW+JPG I mean any RAW file type (e.g. CR2+JPG for Canon or NEF+JPG for Nikon).
Step 1 – Separate JPG’s from RAW+JPG pairs
The tricky part of getting rid of the JPG’s from RAW+JPG pairs is the handling of JPG’s that do not have a corresponding RAW file. One such case is Situation #2 where there are JPG’s that are not part of a pair and LR does not expect there to be a RAW mate. Another case is Situation #4 where LR ‘thinks’ there should be a matching RAW file but for some reason there is not. In these cases we need to retain the JPG.
We’ll start by finding all the images in LR where LR thinks there is a RAW+JPG pair. The easiest way would be to set a metadata filter on “file type” and select “RAW+JPG”. Unfortunately LR does not provide that designation and lumps those images in with other RAW images of the same file type (e.g. CR2’s or NEF’s). So, we have to do this a different way.
First, let’s make sure we can see the file types on images in the grid.
Now that we can see what LR thinks the file types should be we can set a filter to show us only those images where LR thinks there should be a RAW + JPG pair. This will be a text filter for:
This example is for the DNG raw file type. Use your RAW file type instead of “DNG” as appropriate. For example CR2, NEF, ARW, RAF, Etc.
After Verifying that the result after applying the filter is correct, we will move them to a temp folder. If you already have an empty temp folder just drag them to it in LR. If you don’t have an empty temp folder do the following with the RAW+JPG images still selected:
Right Click (Ctrl +Click on MAC) on a folder you want the new temporary folder to go under, then select “Create Folder Inside……”
NOTE: If you create the temp folder on the same disk drive as the folder you’re trying to clean up this step will go a lot faster as it will just do a rename rather than a copy.
In the “Create Folder” pop up, type the new folder name (say “Temp Folder”) and check the box for “Include Selected Photos”. Then press Create.
This will move the RAW and JPG images to the temp folder.
During the move we just did, if LR thinks there should be a pair of images, and the RAW image file is missing you’ll get the warning message shown below. Click continue which will leave the JPG in the original folder.
You may also get a warning of other missing files. This warning will happen if the JPG side of a pair is missing. Click OK and it will move the RAW file(s) to the temp folder
At this point, all the JPG images in the temp folder will be ones we want to get rid of.
Step 2 – Get Rid of the JPG’s
Using Windows File Manager (My Computer) or Mac Finder, sort the images in the temp folder by file type, then delete (move to trash) all the JPG’s – JUST THE JPG’S.
Now that the JPG’s we want to get rid of are trashed, we need to merge the remaining files in the temp folder back into their original folder. Do this from inside Lightroom. In the folders panel select the temp folder. Then select all the images and drag them back to the original folder.
You may get warning messages that it couldn’t find or move one or more files. Ignore these warnings. Once the move is done, check in Windows File Manager or Finder to assure that the temp folder is empty.
Step 3 – Have LR forget about the JPG’s
At this point LR still thinks there are pairs of images when now the JPG’s are missing. So, we come to the part where we have LR forget about the JPG’s. Simply right click (Ctrl+Click on Mac) on the folder name and select “Synchronize Folder”. This will show you the following dialog box. PAY ATTENTION TO IT
If the “Import new photos (n)” line isn’t zero, Lightroom found images in the folder that are not known to Lightroom. But, this count also includes images known to LR where LR thinks there is a RAW+JPG pair but the RAW file is missing. In other words it is saying the JPG of the pair needs to be imported, but it doesn’t. Uncheck this box for now – you can run an import later when we’re done to find any remaining missing photos if desired.
If the “Remove missing photos from catalog (n)” line shows that there are images in the catalog that are not in the folder it is most likely the same case where the RAW file is missing from the pair. If you want to see a list of those images, click the ‘Show Missing Photos” button. This will cancel the synchronize operation and will create a collection in the Catalog panel showing the missing images. To continue though, un check this box
Now Synchronize the original folder and LR will fix the catalog to match what’s physically in the folder – except for one situation……..
Step 4 – Use JPG when RAW is missing
………Remember those image pairs where the JPG was still present but the RAW file was missing? Well, LR thinks they are both missing as LR really wants to use the RAW file and the JPG is just coming along for the ride. So, with the RAW file missing LR thinks the whole set is missing. Hopefully there will not be too many of these. Depending on how many you have, you can just visually scan the grid looking for the exclamation point symbols
Or you can use the “Find All Missing Photos” item in the Library menu. The Find All Misisng Photos is not folder specific so it may take awhile to scan your entire catalog worth of images.
Either way, for each missing image in the folder we’re working on that has a file type of RAW+JPG, click the exclamation point icon in the grid and then select “Locate”.
Now navigate to the JPG, select it and press “Select”. You’ll get a warning message that the file name doesn’t match, click “Confirm”.
Repeat for each missing image.
Step 5 –Clean Up
Now that our folder no longer has those redundant JPG’s and the Lightroom Catalog has been updated to reflect this, we can do a couple of last minute things. All these are optional.
in June, 2016, user "JohnBeardy" referenced a script he had written to delete redundant Jpg's (referred to as side car Jpg's). I found this on the Lightroom Queen forum. I have not used this script nor I am vouching for it and as John states on his page it is free and therefore not supported. But John does know what he's doing. You can find information and the script here http://lightroomsolutions.com/delete-sidecar-jpegs-script/ Instructions are included at the top of the script file.
Keywords: blog, danlrblog, JPG+RAW, Lightroom, Lightroom CC, lightroom classic, Lightroom Classic CC, LR, LR Catalog Clean up, LR CC, lr classic, RAW+JPG, Redundant JPG's, Remove JPG;s from RAW+JPG pairs in Lightroom, Remove redundant JPG's from LR Classic
Wow, this is an amazing blog post solving a problem I've had for a while but couldn't find an answer to. Thanks so much for taking the time to write it out.
There is an additional case, which is where the DNG+JPG pair comes from a phone with computational image enhancement, and the JPG is really a lot better than the DNG without a lot of work in LR. This describes my Google Pixel3. About half the time, I like the JPG better, and often I am unable to get the DNG to match the quality of the JPG.
In this case, I think your tip to check the preference to treat JPG and RAW as separate files is the right trick - then you can pick the one you want. Disentangling the mess from before the option was set requires the techniques you describe!
Thanks for the awesome post! You pretty much described me and my workflow exactly. I will be giving your method a try.
Thank you again
No comments posted.
Recent PostsScotland #03 – Culloden & Cawdor Scotland #02 – Edinburgh to Strathpeffer Scotland #01 – Edinburgh LR016 - Quick Develop vs. Basic Panel LR015 - Grid Cell Shading LR014 - LrC Tip01 - All Photos Really LR013 - KEYWORDS for People Big Sur Coast #01 SW Deserts #04 – Whitesands, Painted Desert, Petrified Forest SW Deserts #03 – Tombstone & Carlsbad Caverns