n0fear Basically you want to use one layout for folders that only contain folders, and another layout for folders that only contain images ... What about folders that contain one folder and lots of images or folders that contain one image and lots of folders? It doesn't quite make sense, and it would be technically complicated to juggle layouts ... what if the user wants to change the layout? Besides, this is how all file browsers work.
In your case, you are thinking more of a photo gallery / albums system, that already predetermines what is an album and what is a gallery, and makes strict rules on how you maintain them.
The only thing I can think of, would be to entirely separate "folders" and "files" into two separate layouts, with folders on top. That sounds ok, but it would then be almost impossible to then allow users to select layouts. Thanks for the suggestion, something to consider for the future, although right now it's not on the radar because I can't imagine how it would work without removing other features.