How to Effectively Organize Your Lifetime Photo Collection
Written on
To manage the photos that represent significant moments in your life, it's crucial to have a systematic approach. While gathering these cherished memories may appear overwhelming, a thoughtful plan can simplify the process and make it rewarding.
Gathering Your Photos
Begin by collecting all of your photos in one centralized location. This encompasses both digital images scattered across various devices and physical prints that may be lying around. Make sure to check your computer, smartphone, social media accounts, cloud storage, old hard drives, and any physical albums.
Initially, I used Google Photos to store my pictures, believing it was a perfect solution. However, I eventually found it lacking. Downloading the photos from Google Photos can be quite tedious, especially if you have a large collection. The easiest way to retrieve them is through Google Takeout.
When you download a substantial number of photos, Google Takeout divides the files into 2GB segments, necessitating individual downloads. I had to manage nearly 130 files. Each file comes in a compressed zip format, and after downloading, you'll need to extract them one by one. Using Windows' built-in unzip feature can be slow, so I opted for WinZip, which offers a 14-day free trial that made the extraction process quicker.
One of the benefits of Google Takeout is that it maintains the original timestamps of your downloaded photos and videos, which will be important later. Sadly, Facebook does not retain the same advantage.
While Facebook does not allow for direct downloads of photos, it does permit downloading a complete copy of your data, including photos and videos.
After downloading and extracting your Facebook data, you’ll likely find a folder structure resembling this:
The media files are stored within the 'media' subfolders, which you can then transfer to your organized photo collection folder.
We will cover timestamp adjustments later.
For a period, I believed that Amazon Photos was the best option for storing some of my pictures. Unfortunately, Amazon Photos does not provide a straightforward download feature on its website. The only way to access your photos is via the Amazon Photos desktop app.
Amazon Photos Applications
To back up all the photos from your computer, use the Amazon Photos desktop app.
<div class="link-block">
<div>
<h2>Amazon Photos Apps</h2>
<div><h3>Upload photos from your computer. To back up all the photos on your computer, use the Amazon Photos app for desktop.</h3></div>
<div><p>www.amazon.com</p></div>
</div>
</div>
For photos stored on your mobile device, you'll need to transfer them to your computer. I transferred images from both my wife's and my phones. However, I encountered frequent interruptions during the copy process. To mitigate this, I accessed the phone's folders directly, copying one folder at a time before deleting it from the device.
After gathering all your photos, consolidate them into a single folder while maintaining the original subfolder structure, such as in c:downloads. Once completed, you're ready to move on to the next step.
Sorting and Categorizing
After placing all your photos in one location, begin the sorting process. You can categorize them by date, event, location, or individuals. Start with broad categories and then create subcategories as needed.
I chose to sort my photos by date for simplicity. Organizing them by year and month makes it easier to find specific photos later. For instance, if you're looking for images from your child's 5th birthday, you can quickly navigate to the correct year and month. The final structure of my organized photo folders looks like this:
How can you achieve such an organized collection from the scattered files in c:downloads? The answer lies in using dedicated software.
<div class="link-block">
<div>
<h2>GitHub - ivandokov/phockup: Media sorting tool to organize photos and videos from your camera in…</h2>
<div><h3>Media sorting tool to organize photos and videos from your camera in folders by year, month and day. …</h3></div>
<div><p>github.com</p></div>
</div>
</div>
Phockup not only sorts photo files but also detects duplicates. Before utilizing Phockup, however, we need to restore the original timestamps for photos downloaded from Facebook.
In the data downloaded from Facebook, the original timestamps are found in HTML files located in the postsalbum folder. To extract these timestamps, we need to create a program.
Below is an example program that successfully worked with my downloaded data:
namespace FBPhotoTimeStamp
{
using System;
using System.IO;
using System.Globalization;
using HtmlAgilityPack;
class Program
{
static void Main(string[] args)
{
string basePath = @"D:facebook-2024-02-23-lhMOWIX5";
string albumPath = basePath + @"your_activity_across_facebookpostsalbum";
foreach (string file in Directory.GetFiles(albumPath))
{
if (File.Exists(file))
{
Console.WriteLine($"album: {file}");
string htmlFilePath = file;
var doc = new HtmlDocument();
doc.Load(htmlFilePath);
var anchorNodes = doc.DocumentNode.SelectNodes("//a[@href]");
if (anchorNodes == null) continue;
foreach (HtmlNode link in anchorNodes)
{
HtmlAttribute att = link.Attributes["href"];
if (IsMediaFile(att.Value))
{
var imgSrc = att.Value;
var timestampNode = link.ParentNode.SelectSingleNode("following-sibling::div/a/div");
if (timestampNode != null)
{
string timestampText = timestampNode.InnerText;
DateTime timestamp;
if (DateTime.TryParseExact(timestampText, "MMM dd, yyyy h:mm:sstt", CultureInfo.InvariantCulture, DateTimeStyles.None, out timestamp))
{
string imgFilePath = basePath + imgSrc;
if (File.Exists(imgFilePath))
{
File.SetLastWriteTime(imgFilePath, timestamp);
Console.WriteLine($"{att.Value}");
}
else
{
Console.WriteLine($"can not find file: {att.Value}");}
}
else
{
Console.WriteLine($"can not parse timestamp: {att.Value}");}
}
else
{
Console.WriteLine($"can not find timestamp: {att.Value}");}
}
}
}
}
}
static bool IsMediaFile(string fileName)
{
string[] mediaExtensions = { ".jpg", ".jpeg", ".png", ".gif", ".mp4", ".mov" };
return Array.Exists(mediaExtensions, extension => fileName.EndsWith(extension, StringComparison.OrdinalIgnoreCase));
}
}
}
Now that we've restored the timestamps for the photos, we can use Phockup to organize the files.
python phockup.py c:downloads d:photos -d YYYY/MM -m --movedel --rmdirs --skip-unknown -t
This command will scan the c:downloadsfolder and its subfolders, checking the timestamp of each media file. It then renames each file with its corresponding date and moves it to the d:photos{year}{month}folder. If a duplicate file is found, the original is deleted; otherwise, the file is relocated. Once complete, any original empty folders will also be removed.
The process identifies duplicates by comparing the file's checksum. Therefore, if two identical photos exist with different qualities, you'll have two files with the same datetime in their names, differentiated by a suffix. This helps in identifying and removing one of the duplicates later.
Typically, the file name appears as follows:
20160101-140812.jpg
If there's another file with a similar name but with a suffix, such as 20160101–140812–2.jpg, it indicates that both files are originally the same photo, saved in different locations or services, resulting in varying compression qualities. If numerous such files exist, the process of removing the “duplicates” can be quite labor-intensive. Below is the code to scan the folder, eliminate lower-quality files, and retain only the highest quality version.
static void RemoveDuplicateImages(string folderPath)
{
try
{
var allFiles = Directory.GetFiles(folderPath, "*", SearchOption.AllDirectories);
var groupedFiles = allFiles.GroupBy(file =>
{
string fileName = Path.GetFileNameWithoutExtension(file);
int index = fileName.Substring(9).LastIndexOf('-');
return index == -1 ? fileName : fileName.Substring(0, index + 9);
});
foreach (var group in groupedFiles)
{
var duplicateFiles = group.Select(file => new FileInfo(file))
.OrderByDescending(file => file.Length)
.ToList();
for (int i = 1; i < duplicateFiles.Count; i++)
{
File.Delete(duplicateFiles[i].FullName);
Console.WriteLine($"Deleted: {duplicateFiles[i].FullName}");
}
}
Console.WriteLine("Duplicate images with lower quality removed successfully.");
}
catch (Exception ex)
{
Console.WriteLine($"An error occurred: {ex.Message}");}
}
In rare cases, your photos may have incorrect original timestamps. This can occur if you used a digital camera in the past without setting the correct time. For these instances, you can rely on the file's modified or creation time using the following command:
python phockup.py c:downloads d:photos -d YYYY/MM -m --movedel --rmdirs --skip-unknown -t --date-field=DateTimeOriginal
Once the photos are sorted, it's time for the next step.
Eliminating Unnecessary Photos
With all your photos organized, the next question is whether you need to keep every single one. Probably not—especially in our mobile age where we often take photos for fleeting moments that don’t warrant long-term storage. It's time to discard these temporary images. Additionally, among similar photos of varying qualities, it's prudent to keep only the best version.
Reviewing each photo can be a tedious task, so using software to expedite this process is essential. A photo viewer that allows for quick browsing and easy deletion of unwanted images is invaluable. I have found FastStone Image Viewer to be the best choice for this purpose.
<div class="link-block">
<div>
<h2>Download FastStone Image Viewer</h2>
<div><h3>Download FastStone Image Viewer FastStone Image Viewer 7.8 2023-09-28 exe exe (site 2) zip portable download download…</h3></div>
<div><p>www.faststone.org</p></div>
</div>
</div>
FastStone allows for rapid navigation through all your photos, enabling you to delete any unwanted images with a simple keystroke. It also allows for previewing video files directly within the application, making it easier to determine whether a video is worth keeping.
After removing unnecessary photos, we can move on to the final step.
Backing Up Your Photos
It's crucial to ensure multiple backups of your digital photos. Consider using external hard drives, cloud storage services, or both.
Backing up your photos on external hard drives is straightforward. However, can you still find the hard drives you used a decade ago? And if you do, are they still functional? The reliability of a hard drive purchased two decades ago is uncertain. Thus, I believe that opting for cloud storage as a comprehensive backup solution is essential. The downside is the cost. While various cloud providers offer limited free space, it likely won’t be enough for a lifetime’s worth of photos. Investing in extra cloud storage and committing to a monthly subscription may not have seemed appealing in my younger years, but as I’ve matured, I recognize the value of safeguarding these irreplaceable memories.
Which cloud storage provider should you choose?
Two key factors to consider are cost and the longevity of the service. After reviewing multiple options, I ultimately selected Google Drive as my preferred provider.
I hope you find this guide helpful!