title: Using webView's loadDataWithBaseURL not loading images from sdcard
body: <p>I would like to set some html content in my webview with some pictures.
  I've read on the internet i must use loadDataWithBaseUrl to do such a thing because i need to link the folder of images <strong>(basUrl)</strong> in order.</p>
  
  <p>My html content nicely loads, i can even ran the javascripts perfectly, but for some reason <strong>my images cannot be loaded.</strong></p>
  
  <p>Somewhere i've read there are some security reasons and thats why i cant load images from sd card to webview and some says it can be easily done <strong>via loadDataWithBaseUrl</strong>, so i really dont know which one is true.</p>
  
  <p>Here is my method i tried, maybe with some mistakes so dont be rude:</p>
  
  <p><strong>I got my html file here:</strong></p>
  
  <pre><code>mnt/sdcard/com.mypackage.myproject/3/3.html
  </code></pre>
  
  <p><strong>My images are here:</strong></p>
  
  <pre><code>mnt/sdcard/com.mypackage.myproject/3/images/Cover.png
  </code></pre>
  
  <p><strong>And this is my content loading:</strong></p>
  
  <pre><code>myWebView.loadDataWithBaseURL("file:///mnt/sdcard/com.mypackage.myproject/3", myHtml, "text/html", "utf-8", "");
  </code></pre>
  
  <p><strong>In my html code:</strong></p>
  
  <pre><code>&lt;img src="images/Cover.png" alt="Cover.png" height="820"/&gt;
  </code></pre>
  
  <p>So as you see i give the baseUrl, and for some reason the webview cannot load my images.</p>
  
  <p>As many said, this can be a solution:</p>
  
  <pre><code>mWebView = (WebView) findViewById(R.id.webview);
  mWebView.getSettings().setAllowFileAccess(true);
  mWebView.getSettings().setJavaScriptEnabled(true);
  mWebView.getSettings().setBuiltInZoomControls(true);
  String base = Environment.getExternalStorageDirectory().getAbsolutePath().toString();
  String imagePath = "file:/"+ base + "/test.jpg";
  String html = "&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;img src=\""+ imagePath + "\"&gt;&lt;/body&gt;&lt;/html&gt;";
  mWebView.loadData(html, "text/html","utf-8");
  </code></pre>
  
  <p><strong>BUT, i have 700 different html files and there are many images in many different places... so i cannot modify the html code.</strong></p>
  
  <p>Is there a way to link the image folder to my html files to properly use them as a baseUrl?</p>