Skip to content

Broken image for broken images

Dan Visel requested to merge broken-images into main

If a document has a format Coko Server can't handle (currently .emf or .wmf), offending images were being replaced by a 1px x 1px blank PNG. Christos pointed out that if we give Wax an image that looks like this: <img src=""> it should put in a placeholder graphic. I tried this, with confusing results: in a document with four images:

  1. image 1
  2. image 2 (the replaced EMF file)
  3. image 3
  4. image 4

where image 2 was an .emf image, what was actually coming back looked like this:

  1. image 1
  2. image 3
  3. image 4
  4. image 3

where the fourth image had incorrect attibutes. What happens is that the server expects all the images to be in the same order as the <img>s that are in the DOM of the document. I added a bit of matching server-side and now for image 2 we get a "No image available" graphic:

Screenshot_2023-06-07_at_5.14.24_PM

Merge request reports