Loading File URI as img src

My install.rdf has multiprocess set to true:

  <em:multiprocessCompatible>true</em:multiprocessCompatible>

My chrome.manifest has remoteenabled set to true:

 content profilist/content_remote ./ remoteenabled=yes

From bootstrap.js, to the most recent XUL window, I add a xul like this:

        var aBrowser = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'browser');
        aBrowser.setAttribute('remote', 'true');
        aBrowser.setAttribute('type', 'content');
        aBrowser.setAttribute('style', 'height:100px;border:10px solid steelblue;');
        aBrowser.setAttribute('src', 'chrome://profilist/content_remote/resources/frameworker.htm');

frameworker.htm can’t seem to load any File URI’s into the <img> src attribute. This is the contents of frameworker.htm:

 this is the image: <img src="file:///Users/noida/Library/Application%20Support/Firefox/profilist_data/images/badges-random-twitter-t-flipicon/badges-random-twitter-t-flipicon_24.png">

However it always comes up as missing image. If i have a script create a new Image and set src it fails to load as well.

Anyone know how I can fix this?

Testing on latest Firefox nightly on Mac OS X - 47.0a1 (2016-02-07)

Thanks

Have you tried using type=“chrome”. Seems like this browser needs privileged access to work properly.

Thanks Litho my man. I should have mentioned, yes I tried that, and it doesnt work in any version of Firefox.

With type content, content-primary, or content-targetable, the page loads, however the image is not and only in nightly version on Mac.

I think this is (semi-)intentional:
https://bugzilla.mozilla.org/show_bug.cgi?id=1221148

1 Like

Thanks so much for that! This is so weird. I’ll dig into it, i just need to simply load a file uri to an img in the document.