added ability to upload an image through file upload or image url