Inkscape links to local raster files (includes hard drive path)

Bug #366993 reported by codedread
4
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Unassigned

Bug Description

When artists create SVG files and they want to include a raster file, Inkscape puts in the absolute path to the PNG/JPG. This is a problem because the image is not portable:

<image xlink:href="/Users/foo/Documents/bar.png" .../>

This is specifically a problem for artists who don't know any better and think that once they've imported a raster it is now PART of the SVG file. This is also somewhat of a security problem because it reveals local hard drive information if the SVG file is shared on the web, etc.

My suggested solution for this is to embed the raster using a data: URL and base64 encode the image. See http://blog.codedread.com/archives/2008/08/27/inkscape-bug-with-embedded-rasters/

I have started a project to clean up SVG files saved from Inkscape, Adobe Illustrator, etc and make them suitable for the web: http://codedread.com/scour/

One of the things that the script does is automatically find an locally referenced rasters, base 64 encode them and change them into data: URLs. This Python script could be easily adapted into either base Inkscape functionality ("Save For Web"?) or as an extension. I encourage participation in the scour project at http://launchpad.net/scour/

P.S. It seems that this bug is somewhat different than Bug 168163 https://bugs.launchpad.net/inkscape/+bug/168163/ because that bug deals with sodipodi/inkscape attributes

Revision history for this message
codedread (codedread) wrote :

Also, this is a big problem on Wikipedia (MediaWiki): https://bugzilla.wikimedia.org/show_bug.cgi?id=3537

jazzynico (jazzynico)
tags: added: svg
Revision history for this message
Martin Owens (doctormo) wrote :

Closing because including PNG/JPEG images in Inkscape 1.0 rewrites the path to be relative when needed. The path is only absolute when the image is new, and the path is rewritten when the svg file is saved. (so correct behavior)

Closed by: https://gitlab.com/doctormo

information type: Private Security → Public
tags: added: bug-migration
Changed in inkscape:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.