# Discobot image lesson may not be working in some circumstances

**URL:** https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218
**Category:** Bug
**Created:** [3 בנובמבר,‏ 2018,‏ 4:09pm UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218 "2018-11-03T16:09:08Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![anon80167013](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@anon80167013](https://meta.discourse.org/u/anon80167013)
#### Post date: [3 בנובמבר,‏ 2018,‏ 4:09pm UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/1 "2018-11-03T16:09:08Z")

</div>

The image lesson is the first lesson that asks you to do two things:

- like the image Discobot sends you
- reply with an image

If you just reply with an image, Discobot says:

> Looks like you didn’t upload an image

even though the image is fine, and it’s just that you need to like the message. Probably it should either not require you to do two things in response to one message, or be clearer that you _have_ to like it, or just actually tell you that you need to like it if you reply without having done so.

(Someone else already reported this [here](https://meta.discourse.org/t/discobot-tutorial-bug-images-lesson-doesnt-work/97726), but apparently it’s not reproducible – initially, I dragged the image Discobot sends you into the reply box; once I failed it once, I copied the link Discobot sends you, and both times I just got “Looks like you didn’t upload an image”, not anything about needing to like the message.)

---

<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: [3 בנובמבר,‏ 2018,‏ 7:54pm UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/2 "2018-11-03T19:54:20Z")

</div>

Can you repro this @jomaxro?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [6 בנובמבר,‏ 2018,‏ 7:26pm UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/4 "2018-11-06T19:26:26Z")

</div>

Yep, can repro. If you upload an image but don’t like the post, you get the “no image found” error, instead of the expected “why didn’t you like my post?”

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/3/f3ff8b5207548ad47fec772e7d4a013be5a7182f.jpeg)

---

<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: [6 בנובמבר,‏ 2018,‏ 8:48pm UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/5 "2018-11-06T20:48:55Z")

</div>

Hmm how did this regress @tgxworld, maybe take a look when you are fully back

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [7 בנובמבר,‏ 2018,‏ 2:13am UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/7 "2018-11-07T02:13:04Z")

</div>

@jomaxro Can you provide me with the exact steps that you took?

I tested on both try and meta which gave me the correct behavior.

 ![Screenshot%20from%202018-11-07%2010-11-33](https://global.discourse-cdn.com/meta/original/3X/8/e/8edea0a8f75df93b43aa049f3df5fff520ca7b9c.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: [7 בנובמבר,‏ 2018,‏ 2:57am UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/8 "2018-11-07T02:57:12Z")

</div>

Definitely no repro on try @jomaxro …

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/6/768efe2c45e4417212564f03b35746d700e878b6.jpeg)

.. if you are somehow getting this to happen, it is subtle. We are gonna need literal click by click and touch by touch instructions.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [7 בנובמבר,‏ 2018,‏ 3:43am UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/9 "2018-11-07T03:43:19Z")

</div>

Interesting, my testing was on try too, so 🤷‍♂️? I’ll see if I can repro it again, and note the steps more specifically.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [7 בנובמבר,‏ 2018,‏ 4:04am UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/11 "2018-11-07T04:04:29Z")

</div>

Repro’d it again. What I did was dragged and dropped the picture of the unicorn from discobot’s post, which caused the “you didn’t upload a picture” error.

I can confirm that uploading an image from local (I tested via drag and drop) works as expected, and I see the “did you forget to ❤ my post” reply.

---

<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: [7 בנובמבר,‏ 2018,‏ 4:30am UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/13 "2018-11-07T04:30:49Z")

</div>

This .. this .. has never been a supported behavior..

You haven’t actually added an image in that case. When we say “drag and drop” we mean drag _from the desktop_ and drop.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [7 בנובמבר,‏ 2018,‏ 4:31am UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/14 "2018-11-07T04:31:48Z")

</div>

Except the error text that you get implies oneboxing will work. (emphasis mine)

> [@](#):
>
> Looks like you didn’t upload an image so I’ve choosen a picture that I’m _sure_ you will enjoy.
> 
> `https://try.discourse.org/plugins/discourse-narrative-bot/images/dog-walk.gif`
> 
> **Try uploading that one next, or pasting the link in on a line by itself!**

---

<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: [7 בנובמבר,‏ 2018,‏ 4:34am UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/15 "2018-11-07T04:34:11Z")

</div>

True, does that one not work? If so that’s a bigger bug.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [7 בנובמבר,‏ 2018,‏ 4:37am UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/16 "2018-11-07T04:37:56Z")

</div>

It didn’t work after I failed with the unicorn picture. I can try again by pasting that first, before I drag and drop the unicorn. One sec…

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [7 בנובמבר,‏ 2018,‏ 4:59am UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/17 "2018-11-07T04:59:31Z")

</div>

Can confirm that pasting the link explicitly mentioned by discobot fails too.

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

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/5/d57aa8d3491aba484dcd151a9849769b98c57aa7.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: [7 בנובמבר,‏ 2018,‏ 5:17am UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/18 "2018-11-07T05:17:34Z")

</div>

OK so looks like that’s the regression @tgxworld – it should detect that as an image.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [14 בנובמבר,‏ 2018,‏ 10:19am UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/19 "2018-11-14T10:19:51Z")

</div>

Ahh I see what the problem is here. When a link to an image is given, it gets converted into a onebox. Any images that are present within a onebox are not counted as an image as far as our post analyzer is concerned. I guess we can be more lax with the rules for discobot such that any image tag in the cooked post is considered to be a valid image?

---

<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: [14 בנובמבר,‏ 2018,‏ 10:33am UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/20 "2018-11-14T10:33:42Z")

</div>

Sounds good to me, let’s make it so!

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [15 בנובמבר,‏ 2018,‏ 2:54am UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/21 "2018-11-15T02:54:54Z")

</div>

Fixed in

[https://github.com/discourse/discourse/commit/6fde58ff90bcf1f7274883050af8a3206bf9f7dd](https://github.com/discourse/discourse/commit/6fde58ff90bcf1f7274883050af8a3206bf9f7dd)

Thank you for reporting @anon80167013 and thanks to @jomaxro for figuring out the reproduction steps 🙂

---

<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: [15 בנובמבר,‏ 2018,‏ 7:12am UTC](https://meta.discourse.org/t/discobot-image-lesson-may-not-be-working-in-some-circumstances/101218/22 "2018-11-15T07:12:32Z")

</div>


