i’m using an HTMLViewer to show tutorial texts. The HTML is stored in a database, sent to the HTMLViewer as text. Within the HTML are references to a handful of images in the form: src=“file://Macintosh%20HD/Users/Shared/< … folder names…>/image001.jpg”>
Instead of an image in the HTMLViewer, I see a grey border outlining where the image should go. The code works fine when run on Windows. The paths are correct; if I change them to a wrong path I get a broken image path icon.
This seemed to work with a late 2015 XOJO release.
Opening an HTML file structured this way in Chrome on a Mac works. On Safari I get the outlines.
Suggestions on how to make my architecture work without putting all my HTML texts in an adjacent folder?
Save the pictures out to the ApplicationSupport folder and write the URLPath in to the HTML source before displaying… You could also encode the images and embed them right in to the HTML so you don’t have to worry about file paths…
i would put the path of those images excluding the image name and jpg/png into a placeholder and then when reading the html from data file, replace the placeholder with the real folder name