How to load a image in webviewer with html code

Hello Everyone,

From past 3 hours I’m searching for a code to load and image in my web viewer but i’m unable to find it.
Tried some codes from puravidaapps but it din’t help me at all. Even his aia files are not working.

So here is the scenario, I want to load an image which is my logo file and it stored in assist with name logo.png.

Can somebody help me with the right code from the scratch.

<img src=“I DON"T KNOW THE PATCH FOR logo.png” width=“48” height=“48” alt="" title="">

Try file:///mnt/sdcard/Makeroid/assets/logo.png

Your html file needs to be in the same folder as your image file for it to load, then you can just use the filename:

<img src="logo.png">

The image file can be in a folder below your html file (in the same path):

<img src="images/logo.png">

or above

<img src="../logo.png">
1 Like

file://path
Works for me :wink:

This doesn’t works for me.

How to know the exact path of my file? Plz suggest

@TimAi2 your reply on my previous post was ready help full I need you help here also

In my case I’m loading HTML code in the app and not storing the HTML file.
In that HTML code I want to load the icon.png which is stored in my assets folder.

Sharing a simple code with you guys for reference

<img src="icon.png" alt="Trulli" width="500" height="333">

plz suggest something which will work in this block. thanks

In my experience, you have no access/route to the file system or the files therein when generating html code, only when you have a physical html file. This is because the generated html “does not know where it is”. You can use web based urls to call in files and data.

1 Like