Bullet proof photo naming convention

Posted on by Wim Mostmans

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:


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:


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.


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.


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.


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

Wim Mostmans

About Wim Mostmans

Freelance full stack developer and Co-founder of Ambassify with a general interest for web technologies and electronics.

Leave a comment

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 ($3)