In Swift 3, I am trying to capture an image from the internet, and have these lines of code:
var catPictureURL = NSURL(fileURLWithPath: \"http://i.imgur.com/
let url = URL(string: "http://i.imgur.com/w5rkSIj.jpg") let data = try? Data(contentsOf: url) if let imageData = data { let image = UIImage(data: imageData) }