Jump to content
UBot Underground

How to view local images in browser?


Recommended Posts

I'm trying to load some local images in the browser window with HTML but I can't figure out the proper syntax...

 

I tried applicationfolder/images/image.jpg     but that doesn't do anything.

 

What is the proper syntax for this?  (It wouldn't work for me if I had to get the full local path to an image)

Link to post
Share on other sites

That only works if every single user has the image on their desktop.  The images I'm trying to display are always in the same folder as the software (applicationfolder), so that absolute path won't really work for me as it would be different for everyone using it..

Link to post
Share on other sites

try

special folder and use Application

 

will use application folder and any other folder within

 

if not work then set path first in a variable

 

TC

 

I tried that, both methods you stated.  Didn't work. :(

 

I used this directly, and set it as a variable, didn't work either way.

 

(application special folder)/images/image.jpg                

 

 

Any other ideas?

Link to post
Share on other sites

I think you are having problems because you are using "load html" command. Instead you should store your HTML to a file and load it with navigate command (for some reason "load html" won't load images, had this problem a while ago).

 

I've just tested this and it loads the HTML and it displays the image.

EDIT: here is a screenshot, since for some reason I wasn't able to paste the code here (I think that string that starts with file:... prevents that): https://db.tt/SUT5IlBN

 

Btw, if nothing works for you can still convert images to "base64" and embed them directly. Here is an example: http://www.techerator.com/2011/12/how-to-embed-images-directly-into-your-html/

  • Like 1
Link to post
Share on other sites

I think you are having problems because you are using "load html" command. Instead you should store your HTML to a file and load it with navigate command (for some reason "load html" won't load images, had this problem a while ago).

 

I've just tested this and it loads the HTML and it displays the image.

 

Btw, if nothing works for you can still convert images to "base64" and embed them directly. Here is an example: http://www.techerator.com/2011/12/how-to-embed-images-directly-into-your-html/

that is cool...I'ma try this on some bloggers

 

you can also navigate to the file path

 

addamroy can we see exact code please?

Link to post
Share on other sites

yep this code works

 

set(#fp pic"{$special folder("Desktop")}\\Penguins.jpg""Global")
set(#pic to b64$plugin function("File Management.dll""$image 2 base64"#fp pic), "Global")
load html("<img src=\"{#pic to b64}\" alt=\"beastie.png\" />")

 

File Management is free plugin :rolleyes:

 

http://www.ubotstudio.com/forum/index.php?/topic/13237-free-file-management-plugin-multiple-commands-and-functions/

 

TC

  • Like 1
Link to post
Share on other sites
  • 1 year later...

yep this code works

 

set(#fp pic"{$special folder("Desktop")}\\Penguins.jpg""Global")

set(#pic to b64$plugin function("File Management.dll""$image 2 base64"#fp pic), "Global")

load html("<img src=\"{#pic to b64}\" alt=\"beastie.png\" />")

 

File Management is free plugin :rolleyes:

 

http://www.ubotstudio.com/forum/index.php?/topic/13237-free-file-management-plugin-multiple-commands-and-functions/

 

TC

Also worked for me.

 

Very good plugin.

 

Thanks OP.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...