added back SortThumbs with a rewrite for new image layouts in JSON