# Spoilers not working for external images

**URL:** https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827
**Category:** Bug
**Tags:** markdown-it-review
**Created:** [2016年三月31日 14:29 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827 "2016-03-31T14:29:34Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [2016年三月31日 14:29 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/1 "2016-03-31T14:29:34Z")

</div>

Tried.

```
[spoiler]https://i.imgur.com/zJ4M8Fx.jpg[/spoiler]

[spoiler]https://i.imgur.com/zJ4M8Fx.jpg[/spoiler]

[spoiler][img]https://i.imgur.com/zJ4M8Fx.jpg[/img][/spoiler]

```

**PS: the pic is very lewd be careful when you click it.**

[http://try.discourse.org/t/testing-spoiler/348](http://try.discourse.org/t/testing-spoiler/348)

One of our community members reported me about this spoiler not working. After few tests on my community. The image uploaded to my discourse over there the spoiler works perfectly, but external image links do not work.

---

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [2016年四月1日 02:42 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/5 "2016-04-01T02:42:03Z")

</div>

[Imgur: The magic of the Internet](https://i.imgur.com/zJ4M8Fx.jpg)

Testing

As of now still does not work, apologies for a second post.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [2016年四月1日 03:15 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/6 "2016-04-01T03:15:56Z")

</div>

That’s because you’re doing

`[spoiler]https://i.imgur.com/zJ4M8Fx.jpg[/spoiler]`

instead of

```plaintext
[spoiler]
https://i.imgur.com/zJ4M8Fx.jpg
[/spoiler]

```

URLs need to start and be on their own line to onebox

EDIT  
Sorry. Now I see what you mean. The URL should show beneath the spoiler without it trying to onebox and fail.

---

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [2016年四月1日 03:36 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/7 "2016-04-01T03:36:46Z")

</div>

Thanks, I am currently on 1.5 beta 14. I have a question, is the stable version also facing the same problem?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [2016年四月1日 03:42 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/8 "2016-04-01T03:42:32Z")

</div>

> [@Alankrit\_Choudh](#):
>
> is the stable version also facing the same problem?

I don’t know, I always run Master.

---

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [2016年四月1日 13:57 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/9 "2016-04-01T13:57:06Z")

</div>

I shifted to stable and i can confirm that the spoiler issue is still the same.

---

<div class="post-metadata">

### Author: ![tibarra](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tibarra/32/52222_2.png) [@tibarra](https://meta.discourse.org/u/tibarra)
#### Post date: [2016年四月1日 16:35 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/10 "2016-04-01T16:35:38Z")

</div>

[Imgur: The magic of the Internet](https://i.imgur.com/zJ4M8Fx.jpg)

Works for me, and works on my locale too!

Maybe fetch and rebase master branch?

---

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [2016年四月1日 16:37 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/11 "2016-04-01T16:37:07Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/b/d/bda4595dea76d11eae106bdbda3c6ddfe2ad6aac.png)

The link is under a spoiler not an image. That is an image, it should be under spoiler.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [2016年四月1日 16:40 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/12 "2016-04-01T16:40:24Z")

</div>

If you want an image under the spoiler it needs to be done as I earlier showed.  
i.e.  
spoiler tag  
image URL  
end spoiler tag

_not_  
spoiler tag image URL end spoiler tag  
on one line

---

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [2016年四月1日 16:44 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/13 "2016-04-01T16:44:33Z")

</div>

Yes that works perfectly. But if i am not wrong, the image was under spoiler directly when  
`spoiler tag image URL end spoiler tag` ❓

---

<div class="post-metadata">

### Author: ![tibarra](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tibarra/32/52222_2.png) [@tibarra](https://meta.discourse.org/u/tibarra)
#### Post date: [2016年四月1日 16:51 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/14 "2016-04-01T16:51:11Z")

</div>

I think that this is a markdown problem, the maintainers are going to move to a new markdown engine, i don’t know when, but @sam and @codinghorror did tell me that several times on some other bug topics… maybe is that

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2017年七月20日 09:33 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/15 "2017-07-20T09:33:21Z")

</div>

Hmm yeah this seems impossible at the moment.

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

`https://blog.codinghorror.com/content/images/2017/06/discourse-download-all.png`

by itself. But spoilered?

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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2017年七月20日 21:34 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/16 "2017-07-20T21:34:01Z")

</div>

Aha after it auto-downloads remote image, it works, but not before.

---

<div class="post-metadata">

### Author: ![rriemann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rriemann/32/115238_2.png) [@rriemann](https://meta.discourse.org/u/rriemann)
#### Post date: [2017年七月29日 06:07 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/17 "2017-07-29T06:07:03Z")

</div>

Maybe @sam wants to add this bug to [CommonMark testing started here!](https://meta.discourse.org/t/commonmark-testing-started-here/65121) ?

---

<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: [2017年七月31日 16:07 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/18 "2017-07-31T16:07:54Z")

</div>

> [@rriemann](#):
>
> Maybe @sam wants to add this bug

Not sure what the bug is?

 ![](https://global.discourse-cdn.com/meta/original/3X/3/e/3eb3f65132c7443887f24613ec04cd82a633d5ce.jpg)

```plaintext
[spoiler][img]//cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/meta/original/3X/3/e/3eb3f65132c7443887f24613ec04cd82a633d5ce.jpg[/img][/spoiler]

```

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2017年七月31日 23:19 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/19 "2017-07-31T23:19:32Z")

</div>

Let me see:

 ![](https://global.discourse-cdn.com/meta/original/3X/a/b/abec36234c16ca41ee7f152e6bbbd1cd13a1496c.jpg)

`https://blog.codinghorror.com/content/images/2017/01/help-keep-your-school-all-american.jpg`

As a spoiler:

[https://blog.codinghorror.com/content/images/2017/01/help-keep-your-school-all-american.jpg](https://blog.codinghorror.com/content/images/2017/01/help-keep-your-school-all-american.jpg)

`[spoiler]https://blog.codinghorror.com/content/images/2017/01/help-keep-your-school-all-american.jpg[/spoiler]`

I think it has to do with the size of the remote image, such that it won’t be downloaded locally.

---

<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: [2017年七月31日 23:25 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/20 "2017-07-31T23:25:26Z")

</div>

I think it’s a onebox edge case… very easy to work around

---

<div class="post-metadata">

### Author: ![rriemann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rriemann/32/115238_2.png) [@rriemann](https://meta.discourse.org/u/rriemann)
#### Post date: [2017年八月16日 22:54 UTC](https://meta.discourse.org/t/spoilers-not-working-for-external-images/41827/21 "2017-08-16T22:54:55Z")

</div>

Off-topic:

I’m impressed that you posted that image already 2 weeks ago considering that the idea is trending only now on twitter… 😯

[![](https://global.discourse-cdn.com/meta/original/3X/a/b/abec36234c16ca41ee7f152e6bbbd1cd13a1496c.jpg) ](https://global.discourse-cdn.com/meta/original/3X/a/b/abec36234c16ca41ee7f152e6bbbd1cd13a1496c.jpg)
