简体   繁体   中英

Webview can't load images from local directory

I can't load images in webview from my local path:

I have this string:

Some content <img src='file:///storage/emulated/0/2.png?1533622895'> Ending content

If I am loading this in a webiview as:

webView.loadDataWithBaseURL("", content, "text/html", "UTF-8", "");

It doesn't load my image. Just the text part only. I have this image locally saved.

Image url contains arguments

?1533622895

Please remove it and try it. It should work

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM