This error is coming from ve.dm.MWInlineImageNode.static.toDataElement method. DOM structure which should be parsed is following:
<figure-inline data-cx="{"adapted":false,"imageSource":"null"}" data-mw="undefined" id="6" typeof="mw:Image"><span about="#mwt16" id="mwEw"><img src="null"></span></figure-inline>
data-mw attribute from the above structure is extracted into mwDataJSON variable and passed to JSON.parse. Since value of that attribute is "undefined", this check does not catch the problem mwDataJSON ? JSON.parse( mwDataJSON ) : {} and the error occurs:
jQuery.Deferred exception: Unexpected token u in JSON at position 0 SyntaxError: Unexpected token u in JSON at position 0 at JSON.parse (<anonymous>) at Object.ve.dm.MWInlineImageNode.static.toDataElement (http://localhost/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWInlineImageNode.js?26093:60:30) at VeDmConverter.ve.dm.Converter.createDataElements (http://localhost/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?6c22b:560:36) at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (http://localhost/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?6c22b:864:30) at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (http://localhost/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?6c22b:990:13) at VeDmConverter.ve.dm.Converter.getDataFromDomSubtree (http://localhost/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?6c22b:990:13) at VeDmConverter.ve.dm.Converter.getModelFromDom (http://localhost/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?6c22b:634:14) at VeInitMwCXTarget.ve.init.mw.CXTarget.setSectionContent (http://localhost/extensions/ContentTranslation/modules/ve-cx/init/ve.init.mw.CXTarget.js?a7c07:730:29) at VeInitMwCXTarget.<anonymous> (http://localhost/extensions/ContentTranslation/modules/ve-cx/init/ve.init.mw.CXTarget.js?a7c07:841:8) at mightThrow (http://localhost/load.php?debug=true&lang=en&modules=jquery%7Cmediawiki.base&only=scripts&skin=vector&version=0owlbb8:3583:29) undefined