The discussion revolves around rendering emojis with absolute URLs in the Discourse API. jboutros initially reported that emojis are being rendered as images with relative links, which are not loading on an external site. simon mentioned that this is also a problem for the wp-discourse plugin and suggested that the issue lies in the emoji.js.es6 code.
sam confirmed that emojis should have fully qualified URLs and categorized this as a minor bug. sam also noted that the emojis should be using the CDN.
zogstrip provided a fix for the issue, which includes using the CDN for emojis in cooked posts. The fix requires a rebake for existing posts.
Interestingly, jboutros found that absolute URLs are being generated on their dev instance, as shown in the provided code snippet.
We’re using the API to get topic and post content and display it on a different site. Emoji are being rendered as images with relative links, which are obviously not loading from the other site.
I read through a topic about the wordpress plugin where it seems like a change was made to make emoji URLs absolute.
Do we need to set some sort of base URL in the settings?
This is a problem for the wp-discourse plugin as well. The wp-discourse plugin attempts to fix relative urls with a regular expression, but that has a few problems.
I think the relevant code is here. I’d send a PR, but I don’t know how to properly get a forum’s absolute url from the front end.