treehousefrog Member Licensed User Longtime User Nov 27, 2013 #1 Hey guys, So I want to use a webview in order to load a HTML file that is saved on the user's device in a folder. This works fine, except that all the images are dead. The HTML points to the images with <a href = "image.jpg"> as normal, and the images are in the same folder as the HTML file itself... So could anyone please explain what's going on here and perhaps provide a fix? It would be a huge help Thanks a lot in advance!
Hey guys, So I want to use a webview in order to load a HTML file that is saved on the user's device in a folder. This works fine, except that all the images are dead. The HTML points to the images with <a href = "image.jpg"> as normal, and the images are in the same folder as the HTML file itself... So could anyone please explain what's going on here and perhaps provide a fix? It would be a huge help Thanks a lot in advance!
thedesolatesoul Expert Licensed User Longtime User Nov 27, 2013 #2 Are you using LoadUrl("file://sdcard/index.html") ? Upvote 0
NJDude Expert Licensed User Longtime User Nov 27, 2013 #3 You have to specify the path to that picture like this: Code: Copy <img src='file:///android_asset/mypicture.jpg'/> The example above displays a picture saved in DirAssets. Upvote 0
You have to specify the path to that picture like this: Code: Copy <img src='file:///android_asset/mypicture.jpg'/> The example above displays a picture saved in DirAssets.
treehousefrog Member Licensed User Longtime User Nov 28, 2013 #4 Thanks a lot guys, makes sense. I'll just have to edit the code on the fly Upvote 0