# תמונות לא מוצגות כאשר נוצר נושא מהערות משובצות באתר

**URL:** https://meta.discourse.org/t/images-not-showing-when-topic-is-created-from-embedded-comments-on-site-site/188726
**Category:** Bug
**Created:** [30 באפריל,‏ 2021,‏ 4:35pm UTC](https://meta.discourse.org/t/images-not-showing-when-topic-is-created-from-embedded-comments-on-site-site/188726 "2021-04-30T16:35:50Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![zebateira](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zebateira/32/218822_2.png) [@zebateira](https://meta.discourse.org/u/zebateira)
#### Post date: [30 באפריל,‏ 2021,‏ 4:35pm UTC](https://meta.discourse.org/t/images-not-showing-when-topic-is-created-from-embedded-comments-on-site-site/188726/1 "2021-04-30T16:35:51Z")

</div>

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…”).

Example:

Blog post: [Welcome to IPFS Weekly 133: April Meetup, Scaling Ethereum, Protocol Labs Resnet Lab, and More | IPFS Blog & News](https://blog.ipfs.io/weekly-133/)  
Discourse Topic: [Welcome to IPFS Weekly 133 | IPFS Blog & News - Blog Posts - IPFS Forums](https://discuss.ipfs.io/t/welcome-to-ipfs-weekly-133-ipfs-blog-news/11084)

 ![116569061-f1fe4880-a900-11eb-9ef7-fdc974fc961d](https://global.discourse-cdn.com/meta/original/3X/4/9/493a434c37ce6a86a8c267ee24a091573364045b.png)

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/ `

Thank you!

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [30 באפריל,‏ 2021,‏ 4:47pm UTC](https://meta.discourse.org/t/images-not-showing-when-topic-is-created-from-embedded-comments-on-site-site/188726/2 "2021-04-30T16:47:05Z")

</div>

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: April Meetup, Scaling Ethereum, Protocol Labs Resnet Lab, and More | IPFS Blog & News](https://blog.ipfs.io/weekly-133/), the image in the post has its `src` set to

`../assets/img/2021-04-14-cardheader-scaling-ethereum-1459531d.1459531d.png`

That causes Discourse to set the `src` to

`https://blog.ipfs.io../assets/img/2021-04-14-cardheader-scaling-ethereum-1459531d.1459531d.png`

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.

---

<div class="post-metadata">

### Author: ![zebateira](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zebateira/32/218822_2.png) [@zebateira](https://meta.discourse.org/u/zebateira)
#### Post date: [30 באפריל,‏ 2021,‏ 5:04pm UTC](https://meta.discourse.org/t/images-not-showing-when-topic-is-created-from-embedded-comments-on-site-site/188726/3 "2021-04-30T17:04:32Z")

</div>

Thank you Simon, appreciate you looking into it.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [30 באפריל,‏ 2021,‏ 9:26pm UTC](https://meta.discourse.org/t/images-not-showing-when-topic-is-created-from-embedded-comments-on-site-site/188726/4 "2021-04-30T21:26:05Z")

</div>

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.

The issue seems to be happening here:

> <https://github.com/discourse/discourse/blob/main/app/models/topic_embed.rb#L161-L170>

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.

---

<div class="post-metadata">

### Author: ![zebateira](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zebateira/32/218822_2.png) [@zebateira](https://meta.discourse.org/u/zebateira)
#### Post date: [1 במאי,‏ 2021,‏ 9:38am UTC](https://meta.discourse.org/t/images-not-showing-when-topic-is-created-from-embedded-comments-on-site-site/188726/5 "2021-05-01T09:38:18Z")

</div>

thank you simon, that’s ok, next week is fine. have a nice weekend!

---

<div class="post-metadata">

### Author: ![zebateira](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zebateira/32/218822_2.png) [@zebateira](https://meta.discourse.org/u/zebateira)
#### Post date: [7 במאי,‏ 2021,‏ 4:46pm UTC](https://meta.discourse.org/t/images-not-showing-when-topic-is-created-from-embedded-comments-on-site-site/188726/6 "2021-05-07T16:46:07Z")

</div>

Hello @simon!

Any updates on this?

Thank you!

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [7 במאי,‏ 2021,‏ 4:54pm UTC](https://meta.discourse.org/t/images-not-showing-when-topic-is-created-from-embedded-comments-on-site-site/188726/7 "2021-05-07T16:54:17Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![zebateira](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zebateira/32/218822_2.png) [@zebateira](https://meta.discourse.org/u/zebateira)
#### Post date: [1 ביוני,‏ 2021,‏ 1:37pm UTC](https://meta.discourse.org/t/images-not-showing-when-topic-is-created-from-embedded-comments-on-site-site/188726/8 "2021-06-01T13:37:36Z")

</div>

Hey Simon, hope all is well.

Any ETA on this?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [2 ביוני,‏ 2021,‏ 4:28pm UTC](https://meta.discourse.org/t/images-not-showing-when-topic-is-created-from-embedded-comments-on-site-site/188726/10 "2021-06-02T16:28:07Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![nbianca](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nbianca/32/157984_2.png) [@nbianca](https://meta.discourse.org/u/nbianca)
#### Post date: [17 בנובמבר,‏ 2021,‏ 9:53am UTC](https://meta.discourse.org/t/images-not-showing-when-topic-is-created-from-embedded-comments-on-site-site/188726/11 "2021-11-17T09:53:14Z")

</div>

Hello,

I am the engineer assigned to this issue. I just pushed a patch to your site and the problem was resolved. The correct image shows up in [Welcome to IPFS Weekly 133 | IPFS Blog & News - Blog Posts - IPFS Forums](https://discuss.ipfs.io/t/welcome-to-ipfs-weekly-133-ipfs-blog-news/11084).

Please let me know if there is anything else I can help you with.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [21 בנובמבר,‏ 2021,‏ 9:00pm UTC](https://meta.discourse.org/t/images-not-showing-when-topic-is-created-from-embedded-comments-on-site-site/188726/12 "2021-11-21T21:00:35Z")

</div>

This topic was automatically closed after 3 days. New replies are no longer allowed.
