For whatever reason, I keep getting a
net::ERR_CONNECTION_REFUSED error whenever I try to create an
img element in a renderer process. For example, If I run the following command in the devtools console:
> var img = document.createElement('img')
> img.src = 'http://i.imgur.com/nsw1Ga6.jpg'
I get the following error message:
GET http://i.imgur.com/nsw1Ga6.jpg net::ERR_CONNECTION_REFUSED
But if I were to load a local image:
> img.src = 'file://absolute/path/to/some/img.jpg' or
> img.src = '../relative/path/to/some/img.jpg'
I get no such error.
What confuses me is that I have no problems making an external http request. In theory I could
GET the image from the web, save it locally, then pass the local address into
img.src. This can’t be the only way though. What stupidly simple option/setting am I missing here? Any ideas?
Thanks in advance for you help.