Images are sorted by orientation.