Page MenuHomePhabricator

Editing does not work with png thumbnail
Open, Needs TriagePublic

Description

When using the default setup, without any extensions like NativeSVGHandler, the this extension draws diagrams as a png by default. (works OK)

However, when editing a diagram, it displays the following error message:

Invalid mime type when loading image from wiki:
Actual: image/png / Expected: image/svg+xml

So apparently the editor loads the png preview instead of the original xml.

This can be fixed by replacing $img->getViewUrl() by $img->getUrl(), as in https://github.com/mgeb/mediawiki-drawio-editor/pull/8