Sorting Photos on iPhone, iPad and iPod – An Update

After I completed the work recorded in my previous post “Sorting Photos on iPhone, iPad and iPod”, I noticed that I had a few stragglers – photos that were still not sorting correctly on my iPad. I looked into this, and quickly discovered that for whatever twisted reason, the iTunes/Photo app pair seemed to be clinging stubbornly to any date they could find embedded in a photo that would mess up the obviously intended, filename-based, sort order.


In this case, it was the XMP data, another set of metadata that can be inserted into image files, often by photo editing programs such as Photoshop, Lightroom and the like. The net result for me was five photos that just would not sort properly, and all because they had a date recorded in their embedded XMP edit history that reflected the date upon which I had last edited the picture in Photoshop! The iTunes/Photo app pair, for whatever reason, were seizing onto THAT obscure date, and using it to set the sort order whenever it differed from the other embedded dates in the file. Sheesh! Apple seems to have gone out of their way to make this as difficult as possible!

Picture 1

I applied the rather draconian fix of simply deleting the XMP data from the offending images (actually, from all of my images in fact), and that has resolved this particular sorting issue. Happily, the same exiftool that was used as the workhorse in my last post was also the mechanism by which I achieved the XMP data removal, and so there is no need to acquire any more tools to accomplish this latest step.

So, with no further ado, here is the upgraded “recipe” for getting photos to sort properly within a folder on your iPhone, iPad or iPod:

  1. Convert all PNG files to JPG before proceeding.
  2. Remove any embedded XMP history with the following exiftool command line command:

    exiftool “-xmp:all=” directory_name

    rm directory_name/*_original

  3. Ensure that all photos have a filename that includes a representation of the date, such as “2014-10-14.01, A Great Photo.jpg”.

  5. Set the embedded EXIF created date to a date derived from the date you have included in the filename with the following exiftool command line command:

    exiftool “-datetimeoriginal<filename" directory_name

    rm directory_name/*_original

That’s it. The images in the folder named “directory_name” should now be sorted more or less correctly in the Photos app after being downloaded to your iPhone, iPad or iPod via iTunes.

I say “more or less” because I have observed that while the above recipe seems to sort things correctly into date order, it still doesn’t sort them into time order within a date. So, within a given day’s photos, the images are still sorted in a manner that defeats my limited cognitive abilities. If and when I figure that little issue out, I will record it here in another post. Until then, at least the photos are sorted into a semblance of proper order.

For the record, I will note that none of this is an issue in the Android ecosystem. On my Samsung Galaxy Note 3, after downloading my image library to the device, I can view the photos in any of a dozen different photo applications, and they always sort into proper order, based on the filename. The above is a purely Apple issue. As you will know if you have visited my companion blog, “Quadras, Cubes and G5s” ( I am a long time Apple “fanboy” and so it pains me to say that this particular experience is better on Android than on iOS, but those are the facts, and I have call it like I see it!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s