Posts Tagged ‘inkscape’

Inkscape – fixing Linked Image Not Found

Tuesday, August 11th, 2009

Inkscape is amazing and I love it. But as with all programs that link to files, it suffers when you go and move those files elsewhere, e.g. to a memory stick, or a different computer. The dreaded Linked Image Not Found all over your lovely artwork.

Ug! what happened to my drawing?

Ug! what happened to my drawing?

The FAQ says to embed all the images, or vectorise (trace) them. Embedding is often not practical if you’re working with high resolution graphics: why should you need to copy your photos, doubling your disc space to use them in your drawing? Tracing them is pretty daft IMO unless you want to achieve that effect because you end up with intensely complicated paths that make your whole drawing (a) massive and (b) slow to render/work with.

So how to fix it?

  1. Open the .svg file in your favourite text editor.
  2. Assuming your images are JPEGs, do a search for .jpg
  3. You’ll see image tags like this
    [xml]<image
    xlink:href=”file:///path/to/your/photo.jpg”
    width=”377.84216″
    height=”251.89478″
    id=”image3559″
    x=”0″
    y=”0″
    />
    [/xml]
  4. Edit the xlink:href attribute to either:
    1. remove the “file:///path/to/your/” bit leaving just “photo.jpg”
      If you do this you need to put a copy of each photo.jpg file in the same folder as the inkscape document.
      or
    2. change it to point the correct path
  5. Repeat for the other occurrences.
  6. Save the file with a new name, (just in case!)
  7. Open in inkscape.

Good luck!

Of course you could code it easy enough if you found you were always losing images.

Hope this helps someone.