Reputation: 57
I'm loading part of the HTML content of a website onto a WKWebView
. The part I'm trying to load sometimes contains an image. Using
webView.loadHTMLString(url, baseURL: nil)
gives me the following image:
Instead of the image being displayed a question mark is there. How do I fix this?
Upvotes: 1
Views: 1316
Reputation: 535315
The problem is the baseURL: nil
. You need to supply the actual base URL! Otherwise, how can the image URL be resolved?
Upvotes: 2