User Tools

Site Tools


File Naming

Updated December 10, 2014.

For the digital photographer, solid Digital Asset Management (DAM) is the foundation for an efficient, profitable photographic workflow. Establishing a convention for your file names, and adhering to it, is an easy way to reap tangible benefits from your DAM. File name convention can help you to locate specific images inside and outside of your Lightroom catalog. It can help you to organize your images, identify ownership of an image, correlate various renditions of your images in multiple locations, factors into Search Engine Optimization (SEO) on the Web, can assist in client proofing and image sales, and much more.

At The Turning Gate, we focus on helping photographers to publish their imagery to the Web. Our image gallery plugins and publishing tools make use of image file names and metadata in various ways to help create a more solid online presence for your images, and our discussion will center largely on preparing your images for the Web. But our recommendations for file naming and DAM don't just apply to using our software; this is sound advice for all digital photographers.


  • File names should not begin with numbers.
  • File names must not begin with the number zero, 0.
  • File names must not contain spaces.
  • File names must not contain punctuation or accented characters.
  • Separate keywords and other information using hyphens.

An Exercise

Let's experience bad file naming firsthand. Visit Google Images and run a search for some of the default file names used by popular digital cameras. For example, search:

DSC_0001.jpg (Nikon)
IMG_0001.jpg (Canon)
_MG_0001.jpg (Canon)
_DSF0001.jpg (Fujifilm X100S)

What you will find is a hodgepodge of imagery, assembled without rhyme or reason, resulting from a population of image-makers utterly lacking an understanding of DAM. As a professional or enthusiast photographer, you must set yourself apart from such nitwits, lest you become lost in this mash of anonymous garbage.

Now search your Lightroom catalog for which ever default file prefix is used by your own camera. If you find even a single image still retaining the camera's default naming, you need to improve your DAM. I'm guilty; are you?

Establishing Convention

As Lightroom users, in establishing our file name convention we need take into account Lightroom's own handling of file names, as well as file naming considerations for the Web. For the latter, we must understand that the Web is far less forgiving than our operating systems. So while the latest versions of Windows and Mac OS X may coddle our bad habits, the Web will not.

To start, access Lightroom's preferences. Under the File Handling tab, copy the settings pictured below.

Our reasons for choosing these settings will become clear as we progress.

1. Do not use spaces or special characters in your file names.

Considerations taken into account by this rule include file sorting, Lightroom's Web export behavior and Web use.

Spaces or special characters in file names can cause a number of problems in sorting, Web use and more. Lightroom recognizes this, and strips file names of spaces and special characters on export from the Web module, replacing them with underscores ( _ ). Rather than relying on Lightroom to do this on export, though, we should name the files in our Library so that Lightroom will have no reason to rename them for the Web. This will ensure that your image file names on the Web match perfectly the image file names in your Library, making it easier to move back and forth between the two, and also ensuring that you can make the most of your web galleries.

To accomplish this, avoid spaces and special characters when naming your files; use hyphens/dashes ( - ) where separations are necessary. Do not use exclamation points, parentheses, slashes, etc. An example file name might look like mc-20070108-Identifier-001.jpg.

If your files are named correctly, the file names of the exported web gallery images will match the file names in your Library.

In summary, the only characters we will be using in file names are letters, numbers, hyphens and underscores.

Accented Characters

Not all hosting systems support accented characters in file and folder names, so it's best to avoid them altogether, as such may cause problems. It may be uncomfortable, for Europeans in particular, to spell words using only nonaccented characters, but the accents simply do not belong in the file system.

Hyphens v. Underscores

While both hyphens and underscores are considered safe for Web use, Google does not recognize underscores as spaces between words. To Google, the file name “my_beautiful_black_kitten” is the same as “mybeautifulblackkitten”. Therefore, for SEO purposes it is better to use hyphens to replace the spaces between keywords or pieces of information.

Lowercase v. Uppercase

Windows servers don't care about case, but Linux servers do. At The Turning Gate, we always recommend using our products in conjunction with Linux-based hosting.

Being hosted on Linux, a user attempting to access a document (or image file) named About.html, using the address will get a 404 error, page not found.

Google would also treat the documents About.html and about.html separately, a negative impact for SEO.

Erring toward safety, many choose to always use lowercase in naming files and folders. This is of little concern in using TTG plugins, however, as the plugins will keep your chosen naming consistent wherever the image is used or referenced. Still, it's worth consideration.

2. Begin file names with an alphabetic identifier.

Considerations taken into account by this rule include file sorting, file identification in your Library and Web use.

File names should begin with an alphabetic code or keyword that identifies you as the photographer. You might use your initials or your name, but this should be something that will be consistent for all of your images. The reason this identifier should never or rarely change is that the next step in the file name will be the date (see below), which will be used to sort our images chronologically. If this front-end identifier varies from image-to-image, it will invalidate our sorting by date.

But this begs the question, then why not begin with the date? The answer is the Web. In using Lightroom to export galleries, your file names will often be used in the gallery source code to fill id or class attributes for various page elements. It is invalid for either id or class to begin with a number or special character; they must always begin with letters or your page will contain validation errors. As a precautionary measure, and to ensure web validation according to W3C standards, it is best to adhere to this rule. Successful page validation can also yield SEO benefits.

Because your initials or name are not likely to vary, they make an excellent front-end identifier for your files. By using a photographer identifier up front, this also makes it easy to separate images from multiple photographers – if you have a second shooter on a wedding job, for example; or if you’re on location and your assistant takes a nice photo of you that you’d like to save, but not mix in with your own shots.

Having this identifier will also help your clients to identify your files amongst others when they receive or archive files from multiple photographers. Because your files all begin with your initials, they will always be grouped together in folders.

My name being Matthew Campagna, my identifier would be “mc”, and our file name in-progress is:


In summary, even if you opt not to begin your file names with a photographer identifier, two points should be taken away:

  • File names should not begin with numbers.
  • File names must not begin with the number zero, 0.

3. Date your files in the format YYYYMMDD.

Considerations taken into account by this rule include file sorting.

One of the key concepts when naming files is to place your broadest identifiers first, and to narrow your identifiers as your move deeper into the file name. Your name will not change, making it the broadest possible identifier; the date will change and daily. But it is important to keep your images in chronological order, as capture time makes for a natural organizational structure.

In keeping with the broadest-first rule, we begin our dates with the year (YYYY), then the month (MM) and finally the date (DD). This will ensure proper chronological sort order on your computer.

For the sake of argument, however, let’s try it another way. Americans often follow the rather backwards habit of writing their dates in the order MM-DD-YYYY. A group of files named in this way would sort improperly, as in this example:


In order for the computer to sort files in the correct order, the year must come first, followed by the month and then the day. Our file name in-progress now looks like this:


If greater specificity is required, or if you shoot very rapidly (continuous shooting for sports, wildlife, etc.), then you might also include the time following the date, in the order hour (hh), minute (mm), second (ss). In such a case, our file name in-progress might become:


4. Use descriptive keywords in your file names.

Considerations taken into account by this rule include file sorting, file identification in your Library and search engine optimization on the Web.

When placing your images on the web, the most important piece of information that search engines are capable of using to identify your images is the file name. It is therefore prudent to make your file names descriptive through the use of keywords. For file sorting purposes, keywords should follow the date and should appear with the broadest keyword first, narrowing in specificity with each subsequent keyword. Keywords should be separated by hyphens. For example:


In this example, “Italia” is the broadest keyword being the name of the country, while “Firenze” becomes more specific in naming the city. We might narrow further by adding additional keywords for locations within that city:


For the sake of argument, see what happens when this broadest-keyword-first rule is not followed:


As you can see, our cities and countries get all mixed up due to our file system sorting by the first letters of each specific location. Here’s one final example that might work well for files from a client shoot, in the order [ Client Name ][ Location ][ Descriptor ]:




Building our in-progress file name, let’s take it back to Italy. Here’s our example thus far:


5. End it with a four-digit sequential counter.

Considerations taken into account by this rule include file sorting.

Why four digits? Say you’re shooting a wedding. You’re definitely going to shoot more than 100 images, probably going to shoot more than 999 images, but will likely not shoot more than 9,999 images unless you’re some kind of masochist. And so the four-digit counter is most often an excellent all-purpose fit. And so, our final file name might look like this:



And that’s it for file names. What have we accomplished in this process?

We now have a file naming system that produces file names which …

  • … are identifiable by the photographer who took them.
  • … are identifiable and searchable by date or keyword in our library.
  • … will sort in proper chronological order on any computer file system.
  • … will remain consistent between your Lightroom Library and Lightroom-generated web galleries.
  • … utilize keywords to improve search engine optimization for each individual image and for our image gallery on the whole.
  • … are valid values for use in HTML source code for id and class attributes.
  • … fully translate back into our Library when using The Turning Gate's client proofing or shopping cart functionality.

In closing, it’s easy to use Lightroom’s Filename Template Editor to create a template for naming your files in this fashion. Here’s how to setup your template:

Then you will only need to enter keywords when renaming files; the template will take care of the rest:

For more information on using the Filename Template Editor, see the Adobe Help Center.

file_naming.txt · Last modified: 2014/12/10 07:56 by matthew

The Turning Gate
Creating webbly, wobbly, Lightroomy things since 2007.