https://community.magento.com/t5/Programming-Questions/Custom-widget-with-image-chooser/m-p/28438
An example:
{{widget type="Elephant\CustomWidget\Block\Widget\TextAndImage" title="Titel" image="{{media url="wysiwyg/photo-1432057322224-8916b9ed202a.jpeg"}}" image_position="top" link="http://google.com"}}
Yeah, that’s my question on the Magento 2 message boards. It works if you use static URL’s, but of course we don’t want that. In Magento 1, this guy does it by adding base64 encoding, but I haven’t built that yet: http://behrendtio.github.io/2013/04/12/using-a-wysiwyg-editor-in-a-magento-widget/
@dmitrii_fediuk have you solved this issue I am getting crazy with this problem. but i think it is more related with quotes because I am getting “{{media url=” in the data array when i try to render the parameters in the template