- Joined
- Apr 3, 2012
- Messages
- 3,103
- Location
- Bay Area, California, USA
- Lightroom Experience
- Power User
- Lightroom Version
- Classic
- Lightroom Version Number
- All
- Operating System
- Windows 10
- Windows 11
- macOS 14 Sonoma
- macOS 15 Sequoia
Over the years, there have been infrequent feature requests for Lightroom to provide file validation to detect when files have become corrupted on disk. With archival catalogs now including tens of thousands of digital photos spanning three decades, how do you test if hardware or software failure has corrupted some of them?
There's at least one old plugin that computes hashes of the files and records them in the catalog, but that can be moderately tedious to manage, since any legitimate change to the file (e.g. saving the metadata into a non-raw) will change the hash, and you've got to figure out which hash differences are legit and which indicate corruption.
After discovering two very old corrupted JPEGs in my catalog that weren't recoverable from my backups (which only go back two years), I came up with the following simple method: Export all the photos in my catalogs, which forces LR to read their image data and metadata. If a file is corrupted, it's very likely LR will complain. Using this method, I validated my catalogs (about 50K photos) and found two more corrupted files.
To make these validating exports go faster and not waste disk space, I defined an export preset Validate Files (attached) that exports all photos as 100 x 100 JPEGs at quality 10 and exports video at the lowest resolution (480 x 270). On my Macbook Pro, it took 1 hour 37 minutes to export my main catalog of 40K pics (2/3 raw) and a couple dozen shorter video clips, and the folder of exported files used about 0.2% of the total space for storing the originals.
To use the Validate Files export preset, download the attachment to your desktop. Then in the LR Export window, right-click User Presets in the left column, do Import, and selected the downloaded file. Select all the files in the catalog and do File > Export With Preset > Validate Files. To select all the files in the catalog, go to All Photographs and do Photo > Stacking > Expand All Stacks. Or define a smart collection All Photos with the criterion Rating Is Greater Than Or Equal To 0 (no stars selected).
If you have other validation methods you like, please share!
There's at least one old plugin that computes hashes of the files and records them in the catalog, but that can be moderately tedious to manage, since any legitimate change to the file (e.g. saving the metadata into a non-raw) will change the hash, and you've got to figure out which hash differences are legit and which indicate corruption.
After discovering two very old corrupted JPEGs in my catalog that weren't recoverable from my backups (which only go back two years), I came up with the following simple method: Export all the photos in my catalogs, which forces LR to read their image data and metadata. If a file is corrupted, it's very likely LR will complain. Using this method, I validated my catalogs (about 50K photos) and found two more corrupted files.
To make these validating exports go faster and not waste disk space, I defined an export preset Validate Files (attached) that exports all photos as 100 x 100 JPEGs at quality 10 and exports video at the lowest resolution (480 x 270). On my Macbook Pro, it took 1 hour 37 minutes to export my main catalog of 40K pics (2/3 raw) and a couple dozen shorter video clips, and the folder of exported files used about 0.2% of the total space for storing the originals.
To use the Validate Files export preset, download the attachment to your desktop. Then in the LR Export window, right-click User Presets in the left column, do Import, and selected the downloaded file. Select all the files in the catalog and do File > Export With Preset > Validate Files. To select all the files in the catalog, go to All Photographs and do Photo > Stacking > Expand All Stacks. Or define a smart collection All Photos with the criterion Rating Is Greater Than Or Equal To 0 (no stars selected).
If you have other validation methods you like, please share!