Saving images to the db.