Images not showing because relative asset path in WYSIWYG content

@darkylmnx, don’t want to start an endless discussion that doesn’t add any value, when I said “That’s one of the reasons that wordpress sucks…” is just a way of saying that’s one of the reasons I don’t like wordpress (in these days people just overreacts and assume any strong statement as an insult or whatever). Honestly, I don’t care if it’s used by 33% of the web, its the same with music and cinema, you can have something that sells massively and is still crap. When you talk in users, you should think in content editors instead, and content editors shall be trained on the tool they will be using, we shouldn’t build interfaces on what end users want, but on what they need (most of the times they don’t know what they want), that’s the reason we have UI/UX experts and that’s the reason Apple got the success they have now.

Now, returning to your problem, I provided you a valid and simple way to deal with that situation that in my opinion is good and I believe it’s a better approach than having a full URL in the field.

As said, I like a component-based approach where I can map directly my content models to react components, so I can reduce complexity and maintain things maintainable in the long term. I’m used to that on Drupal (e.g. using paragraphs module), Contentful (links), DatoCMS (modular contents) and on Cockpit with the Layout field and custom components. I’m not an wordpress expert, but believe same approach is possible, for example if you check https://medium.com/@easternstandard/building-component-based-wordpress-sites-e7223424d4fe the resume quite well the concept by using the flynt framework (https://flyntwp.com)

That permits also to have a better separation between styling and semantic, resuming a shift from page centric web to content centric web, I strongly recommend to read that article - https://alistapart.com/column/wysiwtf/

Comparing in cockpit both approaches:

Traditional
https://take.ms/6PDAi

Component Based
(using LayoutComponents and EditorFormats addons)
https://take.ms/mpAML

If you observe the differences on the resulting JSON object you can see that in the component based approach our JSON is more clean, semantic and robust, that permits a better handling of the information in the FE and we can easily deal with migrations, as there is no need to parse HTML.

The only drawback of the LayoutComponent is the modal interface (instead of an inline where we can expand all components), but probably something for a feature request.

But if still not convinced, and still want absolute URLS, you may take a look on that thread - Full domain path in WYSIWYG?

1 Like