Dragging and dropping images into the inkscape document always creates an absolute link

Bug #272520 reported by Guillermo Espertino (Gez)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Jon A. Cruz

Bug Description

Dragging and dropping images into the inkscape document always creates an absolute link to the image file.
The import command has a different behavior: it creates relative links for images in the same directory or a child, and absolute links for the images placed in different directories. This is, IMO, the right way to manage image links.
Both image importing procedures should have the same linking strategy. Relative links for images are very important when working through LANs (for example: I created a brochure in my hard disk, and my partner has to do some changes on it).
Having relative links and images placed in the same folder than the svg allows to edit the file from any location without having to re-link the missing images.

Tags: importing
Changed in inkscape:
assignee: nobody → jon-joncruz
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

There's also another related problem. When the image is imported from a samba share in linux, the link is always recorded as absolute, no matter if it was imported from the import command or it was dragged and dropped.
If the image is in a remote location, it's only imported with a relative path if the remote location is mounted with cifs (via fstab).

This issue wouldn't be such a big deal if the image properties dialog had a browse button instead of a text input for the path (Bug #172162)

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

This is partially fixed in trunk by allowing the user to embed the image, but this doesn't solve the relative linking issue

jazzynico (jazzynico)
tags: added: importing
Revision history for this message
Fiable.biz (fiable.biz) wrote :

This is a security issue because not all drawers are computer specialists and, when they, for instance, send such a work or distribute it, not only the link won't work but the SVG file will contain information about their file hierarchy and username the recipient can easily read and use.

Revision history for this message
jazzynico (jazzynico) wrote :

Fixed with Bug #170225 (relative image paths instead of absolute) in the trunk, revision 10124.

Changed in inkscape:
milestone: none → 0.49
status: Confirmed → Fix Committed
Revision history for this message
alfredo (alacis) wrote :

Just my five cents worth: I would always prefer relative links for images, even if they are not in the current directory.

For example: I want to have
... << /home/blah/blah/blah/blah/blah
    SOME_SUBDIRECTORY
        project_1
            project_1.svg
        project_2
            project_2.svg
        ...
        maps_library
            australia.png
            ...

Then any linked image, e.g., maps_library/australia.png should be referred to by Inkscape relatively as:

../maps_library/australia.png
NOT:
/home/blah/blah/blah/blah/blah/SOME_SUBDIRECTORY/maps_library/australia.png

The main reason is link "breakage" - if someone takes a copy of "SOME_SUBDIRECTORY" away on their USB stick & tries to edit project_1.svg, then all links are broken.

If the links are relative, and they grabbed the whole sub-tree "SOME_SUBDIRECTORY", then everything will work.

Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → 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.