# دمج JavaScript لا يضيف شرطة مائلة للدليل عند استيراد مسارات الصور، مما يكسر الصور

**URL:** <https://meta.discourse.org/t/javascript-embedding-doesnt-add-directory-slash-importing-image-paths-breaks-images/83204>\
**Category:** Bug\
**Tags:** embedding\
**Created:** [17 مارس 2018، 2:25م UTC](https://meta.discourse.org/t/javascript-embedding-doesnt-add-directory-slash-importing-image-paths-breaks-images/83204 "2018-03-17T14:25:54Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)\
**Post date:** [17 مارس 2018، 2:25م UTC](https://meta.discourse.org/t/javascript-embedding-doesnt-add-directory-slash-importing-image-paths-breaks-images/83204/1 "2018-03-17T14:25:55Z")

</div>

This looks like… a simple bug?

- Example source page: [http://surtdelcercle.cat/index.php?view=blog&id=6](http://surtdelcercle.cat/index.php?view=blog&id=6)

- Images are called with relative paths: `src="media/torbrowser.jpg"`

- Resulting URL: [http://surtdelcercle.cat/media/torbrowser.jpg](http://surtdelcercle.cat/media/torbrowser.jpg) (correct)

- Imported page: [Redirecting...](https://la.confederac.io/t/surt-del-cercle/2865) (notice the broken images)

- The imported image URL: [http://surtdelcercle.catmedia/torbrowser.jpg](http://surtdelcercle.catmedia/torbrowser.jpg) (broken)

Note the slash missing in “catmedia”.

I didn’t find a report for this bug, although this one might be related: [https://meta.discourse.org/t/embedded-topics-dont-handle-images-properly/37355](https://meta.discourse.org/t/embedded-topics-dont-handle-images-properly/37355)

Can anyone reproduce? Or is there a fix that we could implement on our side? (other than defining images with absolute URLs, which we could do moving forward but what about the articles already published)

---

_[View the full topic](https://meta.discourse.org/t/javascript-embedding-doesnt-add-directory-slash-importing-image-paths-breaks-images/83204)._
