Sort db images