7 ms·
I installed Inkscape the other day to try to rescale and save an simple SVG for the web. When I took a look at the text saved in the file, I was pretty shocked
by crazygringo 5y ago
I installed Inkscape the other day to try to rescale and save an simple SVG for the web.
When I took a look at the text saved in the file, I was pretty shocked to discover it saved the entire path of the file in the file.
In other words, it saves a directory structure that could contain your username, the name of the project you're working on, what company you're working for, etc.
Felt like a pretty shocking invasion of privacy to me. When I throw up an SVG on the web, I don't want it to contain potentially personally identifiable information.
- efortis 5y agoHow and where did you install it? The .dmg from their site, and Arch's pacman didn't add user metadata to my installations. You can clear yours: File -> Document Properties -> Metadata (clear all fields) -> Save as default === At any rate, for the web use: File -> Save As -> Optimized SVG
- crazygringo 5y agoJust the .dmg from their site. No idea why your defaults would be different from mine. Why is it even a "feature" in the first place? It's not the kind of thing I'd expect to even have to worry about whether it defaulted to on or off.
- efortis 5y agoProbably for copyright and license. It's a common feature, MS Office documents include even more metadata, such as how many times the file has been saved.
- crazygringo 5y agoMy problem isn't with quantity of metadata. It's with personally-identifying data. And I can't imagine what the filepath could ever have to do with copyright or license. I don't see how this is a common feature at all.
- mattkrause 5y agoYou can include links to other resources (e.g., an image) in an SVG file. Perhaps it's meant to help resolve those paths?
- efortis 5y agoThe only way I can reproduce your scenario is by inserting an image using "Link" instead of "Embed". Other than that, was it part of the original/downloaded file?
- efortis 5y agoSorry I thought you were worrying about your PII and the filepath as two different things.
- Tagbert 5y agoInkscape probably treats the source SVG differently than an optimized output SVG and includes additional data to make editing the file better. Other apps use a proprietary format for their source files that contains this additional information and have to export to an open format for output.
- sirshmooey 5y agoExcellent tool for removing all the fluff: https://jakearchibald.github.io/svgomg/ https://jakearchibald.github.io/svgomg/
- qwerty456127 5y agoNice. But it still is crazy it's put there in the first place. why in the world would it need to?
- FuriouslyAdrift 5y agoAnother great tool is https://exiftool.org/ https://exiftool.org/
- waiseristy 5y agoPreferences -> Input/Output -> SVG output -> Path Data -> Path String format (relative) Does that do what you want?
- LegitShady 5y agoThat should be the default but it sounds like it.
- cies 5y agoExactly.
- colanderman 5y agoThat has nothing to do with filenames. That is referring to the format of linestring paths; whether each point is specified relative to the last.
- nerdponx 5y agoThis is the exact same problem that arose with the Rust compiler recently. At least it can be turned off in Inkscape. Such a weird default.
- char8 5y agolord thanks for mentioning this.
- colanderman 5y agoI haven't upgraded yet, but with 1.0 on macOS, I see a relative path in the sodipodi:docname attribute of the root element (not an absolute path, so either something changed in 1.1 or behavior differs between OSes). This is where you are seeing it correct? Saving as "Plain SVG" does not include this (or any other sodipodi namespace elements, by design). Not great that the default save format includes this, but FWIW best practice is to save as "Plain SVG" for interoperability.
- asddubs 5y agoyou probably saved it as an inkscape svg instead of an optimized svg. it is a bit confusing, but the former is basically the equivalent to the inkscape-native file format, and the latter will remove things specific to inkscape
- Symbiote 5y agoIt looks like the relevant attribute is: inkscape:export-filename="/home/symbiote/Documents/drawing.png" To get this, create a new drawing and draw a shape. Export the whole drawing as a PNG, then save as an Inkscape SVG. [1] is a bug report, but only part of the problem seems to have been resolved. (Tested in this new release.) [1] https://bugs.launchpad.net/inkscape/+bug/168958 https://bugs.launchpad.net/inkscape/+bug/168958
- amelius 5y agoAlways run your files through strings before sending to the web.
- mmerlin 5y agoCan you elaborate? I googled variations of "run files through strings" and this link is the only thing I could find but still unclear https://docs.microsoft.com/en-us/sysinternals/downloads/strings https://docs.microsoft.com/en-us/sysinternals/downloads/stri...
- larschdk 5y agoI feel like the main mistake here is that Inkscape uses the .svg extension for what it basically it's own format. While it is essentially .svg compatible, it includes many extensions and metadata necessary for Inkscape to function. You should really save as optimized or plain .svg before publishing anything made in Inkscape.
- xsmasher 5y agoIf it saves an absolute path, not a relative one, won't it break when you move the project to another machine? Or even move the containing folder to another location?
- vyuh 5y agoI agree, this can be shocking for many casual users. I think there is an option to save a "plain SVG" as opposed to "inkscape SVG". Does "plain SVG" also include such information?
- lucideer 5y ago> pretty shocking Inkscape shouldn't be including this, but just an fyi since you say you were shocked by this: many apps include such metadata in their default save formats. The main distinction with Inkscape is that most apps have a proprietary save format which you are less likely to publish publicly. Inkscape's use of an open standard for their default metadata-rich save format means that metadata often gets published. Still, I do think the trove of metadata many apps leave in their files is probably unnecessary and should definitely be addressed (in all apps, including Inkscape).
- Jermaine_Jabi 5y agoDoes it do that when you save/export for web?
- prokoudine 5y agoAs soon as you export your project, Inkscape retains the path to the exported file so that you could overwrite that file when exporting whenever you reopen that project rather than going once again through the whole process of pointing the program to the right folder and submitting output file name. How is any of this a shocker?
- aliswe 5y agoIf Im not mistaken Blender does this as well?