get hashes from images, and store it in the DB