title: How to open a image stored locally using html code in android?
body: <p>I am using jsoup to parse html and webview to display html content. In the process I am changing the source for a image. So when in html this line is executed <code>&lt;img src="sdcard/rreadyreckoner_images/download-r.png" alt="downloadr" width="191" height="129" /&gt;</code><br>
  the image doesn't load i.e. the there is space left for the image but it does not contain the actual image. How can I achieve this in android?
  This is the code I am using.</p>
  
  <pre><code>    private void showJson(String json) {
          ParseJSON pj = new ParseJSON(json);
          pj.parseJSON();
          String[] instruction = ParseJSON.instruction;
  
  
          for (int i = 0; i &lt; instruction.length; i++)
          {
  
              Document doc = Jsoup.parse(instruction[i]);
  
              if (doc.select("img[src]").attr("src").contains("download-r.png"))
              {
                  Elements image = doc.select("img[src]");
                  String imgsource = image.attr("src");
                  downloadImages(imgsource);
                  Boolean isSDPresent = Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
                  if (isSDPresent)
                  {
                      image.attr("src","sdcard/rreadyreckoner_images/download-r.png");
                  }else
                  {
                      image.attr("src","/storage/emulated/0/rreadyreckoner_images/download-r.png");
                  }
              }
              Log.d("Clean", String.valueOf(doc));
  //            String imgsrc = images.attr("src");
  
              webView.getSettings().setJavaScriptEnabled(true);
              webView.loadData(String.valueOf(doc),"text/html","UTF-8");
  
  
              Elements paragraphs = doc.select("ul li ");
              for (Element element: paragraphs)
              {
                  Log.d("PARAGRAPHS",element.text());
  
              }
  
  
  
              //Log.d("SOURCE",imgsrc);
              //Toast.makeText(MainActivity.this, imgsrc, Toast.LENGTH_SHORT).show();
  
          }
      }
  </code></pre>
  
  <p>This is the html that I am trying to display in a webview.</p>
  
  <pre><code>&lt;html&gt;
     &lt;head&gt;&lt;/head&gt;
     &lt;body&gt;
        &lt;ul&gt;
           &lt;li&gt;The Comprehensive R Archive Network&lt;/li&gt;
           &lt;li&gt;A network of global web servers storing identical, up-to-date, versions of&lt;br /&gt;code and documentation for R&lt;/li&gt;
        &lt;/ul&gt;
        &lt;p&gt;&lt;br /&gt;&lt;strong&gt;Download and Install R:&lt;/strong&gt;&lt;/p&gt;
        &lt;ul&gt;
           &lt;li&gt;Use the CRAN mirror nearest to you to download R setup at a faster&lt;br /&gt;speed. Go to &lt;a href="url"&gt; http://cran.r-project.org&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;Select one of the three download links according to your machine.&lt;/li&gt;
        &lt;/ul&gt;
        &lt;img src="sdcard/rreadyreckoner_images/download-r.png" alt="downloadr" width="191" height="129" /&gt; 
        &lt;ul&gt;
           &lt;li&gt;Run the R set up and follow the instructions of the installer.&lt;/li&gt;
        &lt;/ul&gt;
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I get the follwoing error </p>
  
  <blockquote>
    <p>chromium: [INFO:CONSOLE(1)] "Not allowed to load local resource:
    file:///sdcard/rreadyreckoner_images/download-r.png"</p>
  </blockquote>