Inkscape.org
Creating New Extensions Keep original name of imported image as ID and label name.
  1. #1
    kartik marathe kartik marathe @kartikmarathe

    When I import a.png image into Inkscape, it automatically changes its name (which is reflected in the ID and label name), and I know that Inkscape assigns a unique ID (Name) to each item. However, I want imported images to keep their original names as ID and Label names, and this images have unique names, so the naming is not similar to other images or objects.
    So, I'm hoping that anyone who knows how to handle or deal with this problem may help me.

  2. #2
    inklinea inklinea @inklinea⛰️

    I thing the image import code is internal to Inkscape. 

    The quickest way as a workaround would be to import the images as 'linked' instead of embedded.

    Then make an extension based on image_embed.py

    In which the ID of the image is set from the xlink:href link path before embedding.

    Otherwise you would have to write your own code to import an image using PIL.

Inkscape Inkscape.org Inkscape Forum Creating New Extensions Keep original name of imported image as ID and label name.