It seems that the image insertion tool (ctrl-G in the editor) can't handle an inline image — i.e., one whose src property uses the "data:" protocol. It just totally locked up the browser.

Specifically, I was editing a schematic diagram using Circuitlab on EE.SE. I ran a simulation, and I wanted to include the output image in my post. So, in CircuitLab, I clicked on "Export images", which brought up a separate tab with my image in it. I right-clicked on the image and selected "copy image URL", since I knew that this is what I would want to paste into the image insertion dialog.

I exited CircuitLab, hit ctrl-G and pasted the URL into the dialog. The browser instantly froze up, and I had to close the tab in order to do anything else.

Upon investigation, it turned out that the image was displayed by CircuitLab as

<img src="data:...." ...>

with the data (several KB of it) being right there inline in the HTML. Apparently, the editor dialog just completely falls over when presented with a URL like this.

I ended up having to get back into the CircuitLab editor, rerun my simulation, copy the image to my clipboard, paste that into Paint so that I could save it locally as a .png file, and then use the editor dialog to insert that into my post.

Since CircuitLab and imgur are tightly integrated with SE, this is something that should ideally Just Work. But if that isn't feasible for some reason, the editor dialog should at least detect it and display a proper error message rather than crashing the browser.

(The browser is Chrome in this case, but I suspect that the problem is not specific to the browser.)

  • Sounds more like the editor is crashing because it's overloaded by the amount of data, not the format of the URL. – ale Jun 18 '16 at 13:31
  • @AlE.: That may be, and if so, it's a rookie mistake and should be easy to fix. On the other hand, after thinking about it more carefully, I realized that the reason it's a data: URL to begin with is that the image was actually generated inside the browser itself. The entire CircuitLab editing and simulation environment is client-side code. So the SE editor would have to know how to send the data to imgur so that it can create a file that is can store and serve up later. That sounds like a fundamentally new operation to me. – Dave Tweed Jun 18 '16 at 14:15
  • @AlE. But the editor can handle posts nearly 100 kb long just fine – cat Jun 19 '16 at 19:19

You must log in to answer this question.

Browse other questions tagged .