HTML Viewer and Image

Good morning.

Working on a desktop app that allows users to create pages that will eventually be viewed on a mobile device. The pages are very simple html. I have a viewer (HTMLViewer) so users can preview their work. What I want to do is to allow users to add images. My problem is that I can’t get the image to show.

What I have done is created a temporary folder. I copy the text to the folder and then call viewer.loadPage(folderItem) with the folderItem that is the html text. The text shows up fine.

I have placed the image file (a .jpg) in the same folder, but all I see is the missing image picture. Logo

Given I’m using the folderItem version of loadPage, the viewer should be able to get at the picture. No?


If the src is relative and the image is placed at the correct relative path, then yes it will work.

A great way to add simple HTML rich-text editing to your app is [url=]HTML Edit[/url] Try it out for free, it can even handle images being dropped on it :)

If I use the full path to the picture it works, but I want to use the simplest possible relative path. Both the html file and the image are in the same folder.

If they’re both in the same folder, shouldn’t Logo work?

It does work. Somehow there were curvy quotes.

I continue.


I spoke too soon. It now works in Safari but not yet with the HTMLViewer.

Project that shows it working:

Be sure to turn smart quotes and text replacement off in your editor, those characters can cause issues for the HTML.

Tim, you use ‘Use Builds Folder’
To get it working in Linux I must changed it to

dim fHTML as FolderItem = app.ExecutableFile.Parent.Parent.Child("index.html") me.LoadPage(fHTML)

I’d advocate that everyone should use build folders & appropriate copy file steps.
That way you effectively get a “new” build of your app on each run so you can check that things work correctly from a fresh start.

It used to be that build automation was limited to certain license types but since it isn’t any longer there’s no reason not to use build automation and build folders

It was a quick demo to show that relative image linking works.