# Incorrect or failing oneboxes for links to other discourse instances

**URL:** <https://meta.discourse.org/t/incorrect-or-failing-oneboxes-for-links-to-other-discourse-instances/67351>\
**Category:** Bug\
**Created:** [August 2, 2017, 10:23pm UTC](https://meta.discourse.org/t/incorrect-or-failing-oneboxes-for-links-to-other-discourse-instances/67351 "2017-08-02T22:23:55Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)\
**Post date:** [August 3, 2017, 8:38am UTC](https://meta.discourse.org/t/incorrect-or-failing-oneboxes-for-links-to-other-discourse-instances/67351/12 "2017-08-03T08:38:04Z")

</div>

> [@codinghorror](#):
>
> you need to ignore that for Discourse instances.

> [@techAPJ](#):
>
> the text and image shown in onebox should be of the linked post

Fixed via:

[https://github.com/discourse/onebox/commit/70aa8d5961b6e742c424d25fed6d4615a0d7e42b](https://github.com/discourse/onebox/commit/70aa8d5961b6e742c424d25fed6d4615a0d7e42b)

> [@tophee](#):
>
> what exactly is the expected behaviour when it comes to the images in the onebox? When should I expect the user avatar and when the first image in the post?

Okay, let me try to explain.

### Topic body (first post)

If the first post contains an image, onebox will show that image.

> **[Bear walks into home, then poops and leaves](https://bbs.boingboing.net/t/bear-walks-into-home-then-poops-and-leaves/105061)**
>
> And here I thought they shit in the woods.

If the first post does not have any image it will fall back to `default_opengraph_image_url` setting (more detail [here](https://meta.discourse.org/t/facebook-opengraph-images-not-working-on-the-homepage/46086/22)).

> **[Welcome to BBS, our new discussion boards](https://bbs.boingboing.net/t/welcome-to-bbs-our-new-discussion-boards/31)**
>
> Boing Boing’s had plain old blog comments since 2007. It’s time for something bigger and better. So welcome to BBS, our new discussion boards! The boards run on Discourse, a completely new forum system created by Jeff Atwood, of Stack Exchange...

### Topic reply (random post in a topic)

If the post contains image, onebox will show that image.

> **[Bear walks into home, then poops and leaves](https://bbs.boingboing.net/t/bear-walks-into-home-then-poops-and-leaves/105061/3)**
>
> At least it wasn’t pandas; they’re downright criminal with their antics. Sorry; I had to.

If the post does not contain any image, onebox will show user (poster) avatar.

> **[Bear walks into home, then poops and leaves](https://bbs.boingboing.net/t/bear-walks-into-home-then-poops-and-leaves/105061/6)**
>
> /End-Of-Thread

I hope this clarifies the onebox behaviour.

Also note that this behaviour will be consistent across all the sites that uses OpenGraph tags to fetch data.

* * *

The above oneboxes also verifies that fix is working.. 😊

---

_[View the full topic](https://meta.discourse.org/t/incorrect-or-failing-oneboxes-for-links-to-other-discourse-instances/67351)._
