Bullet proof photo naming convention

Posted on by Wim Mostmans
Photo naming convention

The devil is in the details, and this also applies to something as simple as finding the right naming convention for your precious photos.

This article is an addition to My photo management workflow that I wrote in 2016.

I think it’s clear that there isn’t one best photo naming convention because it will heavily depend on the photo workflow you are using. But, I still think that there will be some interesting takeaways for everyone in how my convention is structured.

To dive right in below, you find some examples of filenames using my naming convention:

20110113_185345_nikond80_8743e6d.jpg
20130328_114119_iphone3gs_91a4a5c.jpg
20200412_105342_nikond7100_def5ff8.nef

Break down

Let’s take this example 20200412_105342_nikond7100_def5ff8.nef and break it up in pieces:

Date and time

The first part of the filename (20200412_105342) represents the date, and the time the photo was taken.

I’m using the ISO 8601 standard here were you order the units of time from the largest to the smallest: year, month, day, hour, minute, and second. Doing this will give you some advantages:

Camera

The second part in our example (nikon7100) represents the camera used to take the photo. This camera part will make it possible to search for all photos taken with a particular camera quickly.

Hash

The third part to talk about is the hash (def5ff8), which is probably also the most significant differentiation point with most other photo naming conventions you’ll find online. To ensure that the hash stays the same, we need to use raw files and store your file modifications in a sidecar XMP file. If you save photo modification in the file itself, it will change the binary and, as a result, also the actual hash of the photo.

The hashing function that I use is SHA-1, which will give me a fixed size short string representation for a given photo. Interesting here to note is that a given picture will always produce the same hash. From this hash, I then only use the seven first characters.

But what is the added value of adding this to your filenames? It turns out that this small piece of information is super powerful and gives you many advantages.

Extension

The last part is the extension, where I always use lowercase letters. There is no real advantage here apart from the convention itself, which keeps everything consistent.

Github

I’ve converted this naming convention into a bash script that can be used to apply my convention easily to your own photos.

Tip jar

Tip Jar

If you like this blog, leave a tip! Your tip will help provide the basic necessities which sustain this blog: coffee, beer and raincoats for surviving the pitiful Belgium climate.

Buy me a coffee
Wim Mostmans

About Wim Mostmans

Freelance full stack developer and Co-founder of the Employee Advocacy platform Ambassify, with a general interest for web technologies and electronics.

Leave a comment