Android Development: Using Image From Assets In A WebView’s HTML

Put your Logo into the assets directory eg: assets/logo.png

Then load your html with:

webView.loadDataWithBaseURL("file:///android_asset/", htmlData, "text/html", "utf-8", null);

Reference your img like:

<img src="https://stackoverflow.com/questions/3779789/logo.png">

Leave a Comment