linked the  uploaded images to the DB