HtmlArea images and links resolved to invalid url

Enonic version: 6.0.0
OS: Debian Linux

When we insert an image or a link in htmlarea input we get these invalid urls:

foo.png

Foo

Hi,

You need to run all html through the processHtml() portal function to transform all IDs to Content and Images to full URLs. We have it in View and in Controller:
http://xp.readthedocs.org/en/stable/reference/view-functions/processHtml.html
http://xp.readthedocs.org/en/stable/reference/libraries/portal/api/processHtml.html

However there looks like there is no way to force png-images to still be png-images (they’re forced into jpg-format). I’ll let a developer look at that and answer you.

Was just about to post a solution to my own problem (due to lack of reading the docs) :slight_smile: Thanks anyway!

Hehe =)

Might help somebody else then, at least :stuck_out_tongue:

A parameter to force/keep image format might be a solution?

That would help a lot =) It’s only with transparent PNGs we get this problem, so a param named “preservepngs” or something might make sense.

Or make it default to preserve this, and name param “forcejpg” and people can set to true when needed.