Cockpit url is being stripped from asset in WYSIWYG field

When placing an asset in the WYSIWYG field the cockpit url is being stripped from the image, only keeping the relative part.
Because its used as a cms the frontend has a different url and thus the image is not being displayed.

Is there a way to prevent this?

When will this be solved/answered??

Hi! My working solution to this is to run Javascript replaceAll on the WYSIWYG string, which would prepend the Cockpit asset folder to the asset URL, fixing the issue. This replacement can be done server-side or on the frontend with Javascript.

This method does work, let me know if you would like me to send a working example.

1 Like

Check the editor’s settings to ensure it keeps the full URLs when inserting images. For specific CMS guidance, consult the documentation or support.