[go: up one dir, main page]

Exporting optimized SVGs makes embedded image paths absolute

Summary:

I have an SVG image, which embeds another image using <image href="other.jpg" .... This later gets deployed to a website (keeping directory structure and filenames). But trying to use the Optimized SVG File setting in the Save As-Dialog always replaces the image path with the full file path. While this works on my local machine, it breaks when trying to deploy it to the website.

This bug is also described (as a sidenote) in #11731 (closed)

Steps to reproduce:

  • open Inkscape with an SVG containing an image tag with a relative path
  • File -> Save As -> Optimized Image -> deselect Embedded Raster checkbox to not embed the image
  • Save it to the same directory as the original image

What happened?

The optimized SVG file saved contains the full path

What should have happened?

The path should still be the same relative path. Either don't change it at all or make it relative to the directory selected in the Save As dialog.

Version info


Inkscape 1.4.2 (ebf0e940d0, 2025-05-08)

                      Compile  (Run)
    GLib version:     2.84.1
    GTK version:      3.24.49 (3.24.49)
    glibmm version:   2.66.8
    gtkmm version:    3.24.10
    libxml2 version:  2.14.2
    libxslt version:  1.1.43
    Cairo version:    1.18.4 (1.18.4)
    Pango version:    1.56.3 (1.56.3)
    HarfBuzz version: 11.2.0 (11.2.1)

    OS version:       Arch Linux