save image to db.