Most operating systems and web applications sort a set of files based off of their name. Numbers come first (0-9), then letters (A-Z), so a filename Image-1.jpg will come before Image-A.jpg.

When your filenames are not zero-padded, it can cause some unexpected results. Take the following list of filenames, for example: 

  • Image-1.jpg

  • Image-2.jpg

  • Image-3.jpg

  • Image-4.jpg

  • Image-5.jpg

  • Image-6.jpg 

  • Image-7.jpg

  • Image-8.jpg

  • Image-9.jpg

  • Image-10.jpg

  • Image-11.jpg

Since many systems sort by name, these images will sort with Image-1.jpg first, and then Image-10.jpg, followed by Image-11.jpg. This is because the 1 in Image-10.jpg and Image-11.jpg comes before the 2 in Image-2.jpg. 

To sort your images as expected, always be sure to zero-pad your filenames when renaming them. So, for example: 

  • Image-01.jpg

  • Image-02.jpg

  • Image-03.jpg

  • Image-04.jpg

  • Image-05.jpg

  • Image-06.jpg 

  • Image-07.jpg

  • Image-08.jpg

  • Image-09.jpg

  • Image-10.jpg

  • Image-11.jpg

When you do this, the 0 will be seen as the first number (for the first nine images), and therefore your images will sort as expected, before getting to Image-10.jpg and Image-11.jpg. 

Use a zero-pad that makes sense based on the number of images you have. If you have less than 100 images, then having only one 0 is fine. If you have more than 100 but less than 1000, then having two 0's is fine. 

For consistency, we recommend always having three 0's so you don't run into a situation where you would have unexpected sort results (unless you are delivering over 10,000 images in a session). 

To zero-pad your filenames in Lightroom: 

  1. Select all your images in the Grid view. 

  2. Select Library > Rename Photos. 

  3. From the "File Naming" dropdown, click "Edit."

  4. Insert Custom Text, type a "-" and then insert Sequence # (0001). 

  5. Press "Done" and type in the name you'd like to use as the prefix (i.e. the client's name). 

  6. Press "Ok."

Did this answer your question?