On our paid hosted instance discuss.ipfs.io, topics created from the embedded comments in the site blog.ipfs.io are not correctly importing the urls of images in the post, making the images not show up in the topic content (after you click “Show full post…”).
It seems that relative image urls are not being parsed correctly and are missing a slash in the final discourse topic content?
The urls are https://blog.ipfs.io..assets/ where they should be https://blog.ipfs.io/../assets/
The issue is related to how the image src is being set on your website. Looking at the post at Welcome to IPFS Weekly 133 | IPFS Blog & News, the image in the post has its src set to
This results in a broken image. Editing the src my browser’s console to https://blog.ipfs.io/../assets/img/2021-04-14-cardheader-scaling-ethereum-1459531d.1459531d.png fixes the issue.
I’m not sure how Discourse should be handling this. I’ll have a closer look at the code that’s used to absolutize the src URL on Discourse and see if there’s anything that can be done.
The cause of the issue is that the images on your website are being served with a relative path (../). Discourse is correctly adding the host name to the path, but it is failing to add a slash (/) after the host.
I can’t think of any cases where it wouldn’t make sense to add a slash after the uri.host if the src starts with a relative path. I’ll ask our engineering team to see what they think about making that change. It’s likely that we won’t be able to get back to you about this before early next week.
Sorry, no updates on this yet. The issue has been noted by our engineering team. I’ll keep following up on it to make sure that it gets fixed. Unfortunately I cannot think of any workarounds for the issue on your site.
Sorry, there’s no ETA on this yet. We are having an internal discussion about improvements that need to be made to embedding. The issue of the embed code not handling relative src paths has been noted and will be fixed.