title: Swift display image in webview
body: <p>Using Swift with WebView:</p>
  
  <p>I am creating html which I display in the webView control. The text html displays as expected but I am having trouble displaying and image which is in the project.(bundle) below is the code I have tried:</p>
  
  <pre><code>let urlpath = Bundle.main.path(forResource: "ld", ofType: "png");
  
  webOut += "&lt;img src='\(urlpath!)' height='16' width='16'&gt;"
  webOut += "&lt;h3 style='color:#FD7D70ff'&gt;\(sta.person!)&lt;/h3&gt;"
  webOut += "&lt;div style='font-size: \(statementTextSize)'&gt;\(sta.text!)&lt;/div&gt;"
  
  let requesturl = NSURL(string: urlpath!)
  webView.loadHTMLString(webOut, baseURL: requesturl as URL?)
  </code></pre>
  
  <p>the image does not display.</p>
  
  <p>What is the best way to display an image in this scenario?</p>