Sorts pictures by date