sort gallery from newest to oldest