Image Not Found is altering the size of the image, results in document corruption

Summary:

The not-found image alters the width/height of the image element. This means that even if the image is restored, the document has been modified and the aspect of the image corrupted.

Steps to reproduce:

  • open Inkscape
  • download document (drawing.svg) plus image (dessert.jpg)
  • open document, you should see a small circle and an image of a dessert
  • outside of inkscape, move/rename the image
  • Alt-tab back to inkscape
  • The Not-found image is square, not the original image's aspect layer

To show this isn't just visual/temporary:

  • Move the little circle in the top-left (Do not touch the image element)
  • Save the document and close*
  • Restore the original dessert.jpg file
  • Load the document
  • The dessert image appears, but squished into the square format

(*You need to close/reload since once an image is marked not-found it appears the Inkscape will never attempt to load it again. It'd also be nice if it rechecked when becoming active.)

What happened?

The not-found image altered the aspect (size) of the missing image.

What should have happened?

The not-found images should not alter the document in any way.

Sample attachments:

Version info

Inkscape 1.1.1 (3bf5ae0, 2021-09-20)

    GLib version:     2.64.6
    GTK version:      3.24.20
    glibmm version:   2.64.2
    gtkmm version:    3.24.2
    libxml2 version:  2.9.10
    libxslt version:  1.1.34
    Cairo version:    1.16.0
    Pango version:    1.44.7
    HarfBuzz version: 2.6.4
    Poppler version:  0.86.1

    OS version:       Ubuntu 18.04.6 LTS

Edited by Nathan Lee