SVG Embed Images in Offline Mode

522 views
Skip to first unread message

Steve Jordahl

unread,
Aug 9, 2017, 1:15:00 PM8/9/17
to draw.io
Just curious why the Embed Images checkbox in the SVG Export dialog is greyed out in offline or chrome app mode.  Is there a way to enable it in the current version?  Will this feature be enabled in a later version, or can I expect that it will only operate in online mode?

Thanks,
Steve

Gaudenz Alder

unread,
Aug 10, 2017, 6:02:21 AM8/10/17
to draw.io
No, what this does is download and replace the image in the SVG, which does require the app to be online.

Steve Jordahl

unread,
Aug 10, 2017, 1:19:39 PM8/10/17
to draw.io
Thank you for the response.  I know what the Embed Images function does, and am curious why an online version needs to be used.  None of my questions were answered by this response.

I believe this function uses a simple base64 binary-to-ascii converter for the image, and am not sure why it wouldn't work in offline or chrome app mode.  If I have a local image I would expect offline mode to work.  I don't see a reason that the chrome app wouldn't work in either online or offline mode.

Gaudenz Alder

unread,
Aug 10, 2017, 1:24:42 PM8/10/17
to draw.io
Local images are converted at insert time.

Steve Jordahl

unread,
Aug 10, 2017, 1:30:42 PM8/10/17
to draw.io
I know this as well.  But if you then export the file as SVG and don't (or can't) check the Embed Images checkbox those images imported from external sources don't make it into the SVG file.  This is the reason for my initial question.  It doesn't make sense to me that the Embed Images function would be available in the online version but not in the others when, to your point, the image is already converted into the XML file.

Gaudenz Alder

unread,
Aug 10, 2017, 1:35:19 PM8/10/17
to draw.io
Sounds like a bug. Is this with the Chrome app or the offline app? How did you import the image and what were the expected and actual result of the SVG export? (If offline app, which browser are you using?)

Steve Jordahl

unread,
Aug 10, 2017, 5:09:39 PM8/10/17
to draw.io
In the online version, the "Embed Images" box is available to check, and in either offline or chrome app mode it is greyed out and unavailable.

Here is new information that I found by creating the attached files using the test.xml file.  I'll spell out the entire process, because there's a nuance.
  1. In online app, open test.xml, select File -> Export -> SVG, check the Embed Images box, output is test-online.svg
     -- Works as expected
  2. In online app, open test.xml, select File -> Export -> SVG, DO NOT check the Embed Images box, output is test-online-noEmbed.svg
     -- Works, but not expected since Embed Images was not checked
  3. In offline app, open test.xml, select File -> Export -> SVG, CANNOT check the Embed Images box since it's greyed out, output is test-offline.svg
     -- Works, but not expected since Embed Images was not checked
  4. In chrome app, open test.xml, select File -> Export -> SVG, CANNOT check the Embed Images box since it's greyed out, output is test-chromeapp.svg
     -- Does not work, and resulting file has a missing image icon
In my process I started with Chrome app mode, and when I couldn't check the Embed Images box and got the missing image icon I believed that function to be required to send externally sourced images into the SVG.  When I tried the offline app and found that the Embed Images box was greyed out there as well I mistakenly assumed that the output would be the same and that the Embed Images function was required for proper function.  In the online app, I had been checking the Embed Images checkbox, thinking it was required for my desired output, but now I find that leaving it unchecked yields the same result.

So, my new question is, what is the actual function of the Embed Images checkbox?  It appears that the chrome app has a bug with exporting images into SVG.
test-online.svg
test-offline.svg
test-chromeapp.svg
test.xml
test-online-noEmbed.svg
Reply all
Reply to author
Forward
0 new messages