Displaying images in the right order in Preview

This is one of those tricks that you rarely need, but when you do need it, it really saves tearing your hair out!

You probably know that Preview lets you view multiple images in a single Preview window, with each image thumbnailed in the drawer. (To do this, simply multi-select all your images in a Finder window, and hit Command-O to open them.) Preview helpfully sorts the images in the drawer alphanumerically by filename (by default). This is a really handy feature, as it means that you can open, say, 100 images without causing 100 Preview windows to appear!

This is all very well, but occasionally Preview displays the images in the wrong order in the drawer. (This happens in Mac OS 10.4.9 – the latest at the time of writing – and I’m pretty sure it affects earlier versions too.) It seems to happen pretty much at random, but I’d hazard a guess that it’s something to do with the way Finder passes the filenames to Preview. You can see the problem in the screenshot below – the third image should be fg0104, not fg0807b:

Preview showing files in the wrong order

This is frustrating if you’re viewing a lot of images, and you need to view them in the correct order. For example, in the above screenshot I’m previewing hundreds of figures for a Photoshop book I’m writing, so I need to make sure they’re all there in the right sequence.

Here’s how to persuade Preview to sort them correctly. Right-click any thumbnail and you’ll see a drop-down menu appear, listing the available sorting options for the drawer, as well as showing you the current sort order:

Drop-down menu showing current sort order

As you can see, it’s currently set to “name”, yet it’s not sorting properly by name. The solution is simply to click “name” again; this seems to jog Preview’s memory, and it re-sorts the drawer correctly, by filename, in alphanumeric order:

Preview now showing files in the correct order

A handy little trick when you need it!

Bookmark this post:

7 Responses to “Displaying images in the right order in Preview”

  1. Windell Oskay Says:

    Oh thank you– this has been making me pull my hair out!

  2. Matt Says:

    Great stuff Windell – it’s not just me then 🙂

    Fantastic work on the CandyFab by the way. What a wonderful machine!

  3. Henry Says:

    Brillinant, cheers! 😀

    Is there anyway that this can be automated?

    Also, I’d like not to have to select every file that I want to open in preview. I.e. I’d like to be able to double click the first file in a folder containing many images and be able to scroll through the lot in preview. Can this be done?

  4. Matt Says:

    Hmm… I don’t think you could automate it via AppleScript at least, as Preview doesn’t support AppleScript. 🙁

    Regarding your “open all images in a folder” thing – I’ve knocked together a simple Automator workflow that opens the images inside a selected folder in Preview. Not quite the same thing, but I hope it helps!

    Grab it here:

    https://mac.elated.com/wp-content/uploads/Open%20Folder%20in%20Preview.zip

    Unzip it, then double-click the workflow icon to open in Automator. Then choose File>Save As Plug-in, give it a name, and choose Finder from the Plug-in For list. You can then right-click a folder in Finder and choose Automator>(your plug-in name). All the images inside that folder should then open in Preview.

    To delete the plug-in, delete the corresponding file in Library>Workflows>Applications>Finder.

    (Disclaimer: use at your own risk etc etc!)

  5. Will Henshall Says:

    this is still a problem with 10.4.11, and as I am not yet using Leopard on our edit machines, it drivers me crazy as I have to do the trick to fix the bug at least 20 times a day when reviewing low res jogs for client approval…

  6. Sharon Says:

    Yeah that works, but if you try right after that to open another set of pictures, it doesn’t remember again. Is there any way to make it remember the order you want by default?

  7. Matt Says:

    @Sharon: I don’t think so, unfortunately.