Thread:Extension talk:WYSIWYG/Patch for CKeditor.body.php to make it work in MW 1.18/reply (13)

Here is a fix such that the filename is not lost on saving. Simply put the code below into the FCKeditor.php. You have to adapt the regular expression ($wgImageLinkPattern) such that it fits your language of the wiki. Mine is german so in the URL there is title=Datei:image.png. If you have the English version simply replace Datei by File.

When you want the fix also to work when switching from wikitext to WYSIWYG mode, then adapt the FCKeditorSajax.body.php to also replace the image links.

Hope this helps. However when switching to wikitext the image links are still in wrong format. But they are corrected on saving.