Unable to add image inside WYSIWYG

Enonic version: 6.10.1
OS: Ubuntu 16.04


We’ve got an issue with inability to add image inside a WYSIWYG.
Here is how it appears:
Create a part with a config:

    <input type="TextLine" name="TITLE">
      <occurrences minimum="0" maximum="1"/>
    <input name="TEXT" type="HtmlArea">
      <occurrences minimum="1" maximum="1"/>
    <input name="START_DATE" type="DateTime">
      <label>Start Date</label>
      <occurrences minimum="0" maximum="1"/>
    <input name="STOP_DATE" type="DateTime">
      <label>End Date</label>
      <occurrences minimum="0" maximum="1"/>

Add some text and an image to the WYSIWYG. The image will appear correct in a WYSIWYG, but it will not in a template. This is what we get in a template:

<img src="image://c5c0e0e4-e44b-4d3c-841a-b0c79f38e5f7" alt="IMG_3327" style="text-align: justify; width: 100%;">


Your result is the internal image link format in Enonic XP. If you process the HtmlArea content using processHtml() then you should get a working image URL as a result.

processHtml() view function documentation:

There’s also a processHtml() included with the portal lib if you want to process the HtmlArea inside your controller.