# Images produce unlink icon when copied locally

**URL:** https://meta.discourse.org/t/images-produce-unlink-icon-when-copied-locally/122495
**Category:** Bug
**Tags:** wordpress
**Created:** [7월 9, 2019, 10:02오후 UTC](https://meta.discourse.org/t/images-produce-unlink-icon-when-copied-locally/122495 "2019-07-09T22:02:53Z")
**Posts on this page:** 8
**Page:** 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: [7월 9, 2019, 10:02오후 UTC](https://meta.discourse.org/t/images-produce-unlink-icon-when-copied-locally/122495/1 "2019-07-09T22:02:53Z")

</div>

Hi, we have a WordPress connected to Discourse. The images of the blog post are pub;lished correctly in Discourse, but they are lost when the automatic production of the local copy starts. An unlinked icon is shown instead. Rebuilding the HTML makes the images appear again… and disappear when they are changed by a local copy.

For what is worth, the images render just fine when uploaded manually.

The blog post: [New advanced mobile contribution features coming to mobile – Diff](https://space.wmflabs.org/2019/07/08/new-advanced-mobile-contribution-features-coming-to-mobile/)

The corresponding topic with the missing images: [https://discuss-space.wmflabs.org/t/new-advanced-mobile-contribution-features-coming-to-mobile/437](https://discuss-space.wmflabs.org/t/new-advanced-mobile-contribution-features-coming-to-mobile/437)

In fact, let me copy the same HTML here to see whether this bug can be reproduced in this instance:

 ![](https://global.discourse-cdn.com/meta/original/3X/f/4/f4e27f272fff9f33d5d6550d4db6a222c616f19c.png)

 ![](https://global.discourse-cdn.com/meta/original/3X/a/8/a88455e45bad592c2dc7daad52ebe2e8aa5a1709.png)

---

<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: [7월 9, 2019, 10:09오후 UTC](https://meta.discourse.org/t/images-produce-unlink-icon-when-copied-locally/122495/2 "2019-07-09T22:09:01Z")

</div>

Hm. They do render here… Now I’m even more confused. Any hints?

---

<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월 10, 2019, 12:30오전 UTC](https://meta.discourse.org/t/images-produce-unlink-icon-when-copied-locally/122495/3 "2019-07-10T00:30:32Z")

</div>

Have you disabled the `download remote images to local` site setting?

I tried copying the image tags from [this post](https://discuss-space.wmflabs.org/t/testing-images-copied-automatically/455/3) that are failing for you to my hosted Discourse site. Discourse is automatically downloading the images for me. They display without any issue.

---

<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: [7월 10, 2019, 7:52오전 UTC](https://meta.discourse.org/t/images-produce-unlink-icon-when-copied-locally/122495/4 "2019-07-10T07:52:43Z")

</div>

> [@simon](#):
>
> Have you disabled the `download remote images to local` site setting?

No. In fact, in that topic the first image (jpeg from Wikimedia Commons) is successfully copied locally and displayed while the other two (png from our Discourse) are not. See [https://discuss-space.wmflabs.org/t/new-advanced-mobile-contribution-features-coming-to-mobile/437](https://discuss-space.wmflabs.org/t/new-advanced-mobile-contribution-features-coming-to-mobile/437)

I wonder whether file format, image size or file size have anything to do with this problem. png’s are allowed in our instance. We are running [v2.4.0.beta1 +50](https://github.com/discourse/discourse/compare/557805249defdcfb13ce363cd8121cbed6cc8ee4...tests-passed).

---

<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: [7월 11, 2019, 10:26오전 UTC](https://meta.discourse.org/t/images-produce-unlink-icon-when-copied-locally/122495/5 "2019-07-11T10:26:57Z")

</div>

I’m quite puzzled by this problem, which can be reproduced in our instance after upgrading to [v2.4.0.beta1 +225](https://github.com/discourse/discourse/compare/e0562a81725d5e95856f4062408ea727c3bc6839...tests-passed) as well.

- [https://discuss-space.wmflabs.org/](https://discuss-space.wmflabs.org/) can create local copies of external images, except from [https://space.wmflabs.org/](https://space.wmflabs.org/). File format and size don’t seem to be relevant.
- Other Discourse instances can create local copies of images from [https://space.wmflabs.org/](https://space.wmflabs.org/)

???

We don’t even know hot to debug this. There is nothing we have found in the diffs or error logs in Discourse. Strange.

---

<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월 11, 2019, 5:36오후 UTC](https://meta.discourse.org/t/images-produce-unlink-icon-when-copied-locally/122495/6 "2019-07-11T17:36:50Z")

</div>

Have you tried copying an image from [https://space.wmflabs.org/](https://space.wmflabs.org/) into a post on [https://discuss-space.wmflabs.org/](https://discuss-space.wmflabs.org/) that has not yet been published to Discourse from WordPress? Does this make any difference?

---

<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: [7월 11, 2019, 8:08오후 UTC](https://meta.discourse.org/t/images-produce-unlink-icon-when-copied-locally/122495/7 "2019-07-11T20:08:46Z")

</div>

Apparently not. ☹

[https://discuss-space.wmflabs.org/t/testing-images-copied-automatically/455/12](https://discuss-space.wmflabs.org/t/testing-images-copied-automatically/455/12)

I uploaded the image to the media library and then linked to it from Discourse without the WP-Discourse publishing process in between.

I’ll link to it here just to see it working here and cry. 🙂

Same source:

 ![](https://global.discourse-cdn.com/meta/original/3X/f/9/f94119302bf2b741595a19e4d8fe44d2643f0698.png)

`![](upload://zz0muBQZNCajH7d2ePNM9uqhYNO.png)`

 ![](https://global.discourse-cdn.com/meta/original/3X/f/9/f94119302bf2b741595a19e4d8fe44d2643f0698.png)

---

<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: [7월 11, 2019, 9:27오후 UTC](https://meta.discourse.org/t/images-produce-unlink-icon-when-copied-locally/122495/8 "2019-07-11T21:27:14Z")

</div>

Another detail that I just realized is that here pasting `https://space.wmflabs.org/wp-content/uploads/2019/07/CC0_button.svg_.png` renders the image, while the same doesn’t [in the other instance](https://discuss-space.wmflabs.org/t/testing-images-copied-automatically/455/12).
