Implement uploading images into db.