# Oneboxing Reddit topics with images isn't working right

**URL:** https://meta.discourse.org/t/oneboxing-reddit-topics-with-images-isnt-working-right/112890
**Category:** Bug
**Tags:** onebox
**Created:** [29 maart 2019 om 03:41 UTC](https://meta.discourse.org/t/oneboxing-reddit-topics-with-images-isnt-working-right/112890 "2019-03-29T03:41:33Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![1101010](https://avatars.discourse-cdn.com/v4/letter/1/6de8d8/32.png) [@1101010](https://meta.discourse.org/u/1101010)
#### Post date: [29 maart 2019 om 03:41 UTC](https://meta.discourse.org/t/oneboxing-reddit-topics-with-images-isnt-working-right/112890/1 "2019-03-29T03:41:33Z")

</div>

I’ve tried searching on here for this but I can’t see that anyone’s raised it.

Basically it seems like on DrownedInSound for some sites when I paste a URL and at the other end there’s an image the post just displays the image but it isn’t a link back to it.

E.g. this reddit thread has the first post as an image only (description is in the title):  
[https://www.reddit.com/r/HistoryPorn/comments/39p56o/kids\_jump\_from\_a\_2nd\_story\_window\_onto\_mattresses/](https://www.reddit.com/r/HistoryPorn/comments/39p56o/kids_jump_from_a_2nd_story_window_onto_mattresses/)  
and when I just paste the URL in my post it becomes completely free of all context:  
https://embed.reddit.com/r/HistoryPorn/comments/39p56o/kids_jump_from_a_2nd_story_window_onto_mattresses/?embed=true&ref_source=embed&ref=share

The same thing happens with Flickr:  
[https://www.flickr.com/photos/call-to-adventure/2284899852](https://www.flickr.com/photos/call-to-adventure/2284899852)  
is rendered as only the picture  
[![Imgur](https://global.discourse-cdn.com/meta/original/4X/d/8/7/d87ee794dd3c775280003c4a4a87abcbde3eee64.jpeg "Family Circus: September 11th, 2002") ](https://www.flickr.com/photos/call-to-adventure/2284899852)

If you quote the post you get the link back so you can still effectively get it again. I assume there’s a fault somewhere in the way it’s parsing these URLs. I know Instagram did this for a brief period but it’s working again.

Or is this due to the sites themselves?

TIA

---

<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: [29 maart 2019 om 04:16 UTC](https://meta.discourse.org/t/oneboxing-reddit-topics-with-images-isnt-working-right/112890/2 "2019-03-29T04:16:29Z")

</div>

This happens due to 2 things.

1. [Creating rich link previews with Onebox](https://meta.discourse.org/t/rich-link-previews-with-onebox/98088)

2. We have a site setting called `download remote images to local` which copies all images to your site to avoid “hotlinking” which is super bad mojo.

What you seem to be asking for here is:

[![Imgur](https://global.discourse-cdn.com/meta/original/3X/9/a/9a2b36752a5f682ec2c5c97394bcb10ac312d9ed.jpeg "ferret") ](https://www.flickr.com/photos/kilokilo/3106467229/in/photolist-frAfDr-foY2Vw-2ogywt-Vi5rhx-65wPS1-r4h3ub-7CabKf-5aHjuJ-7KdHyk-MgHSFq-71mPRL-68nrQE-28nkP9-4T4Qh-4c5R7X-5JvstP-7CabKJ-dNSDQ9-4MfKFA-5LMykV-4hgrkz-3TaFwV-qHtcRQ-WkAzMa-pK2Zu3-4cEDPz-VUZdb6-7YtFHK-dfUrh-9kFdQf-5aEBYe-7oN4yk-r5qKak-dF71jC-7Yz6WY-7Yz6FU-7YtFMk-6hTv2d-3bAVQn-dF6TRj-93epGj-dF1tAH-pNLHfG-7sodw7-4Lpewj-qtkqU4-7Yz74E-5bzZe4-2aqoAo-5uTye2)  
[source](https://www.flickr.com/photos/kilokilo/3106467229/in/photolist-frAfDr-foY2Vw-2ogywt-Vi5rhx-65wPS1-r4h3ub-7CabKf-5aHjuJ-7KdHyk-MgHSFq-71mPRL-68nrQE-28nkP9-4T4Qh-4c5R7X-5JvstP-7CabKJ-dNSDQ9-4MfKFA-5LMykV-4hgrkz-3TaFwV-qHtcRQ-WkAzMa-pK2Zu3-4cEDPz-VUZdb6-7YtFHK-dfUrh-9kFdQf-5aEBYe-7oN4yk-r5qKak-dF71jC-7Yz6WY-7Yz6FU-7YtFMk-6hTv2d-3bAVQn-dF6TRj-93epGj-dF1tAH-pNLHfG-7sodw7-4Lpewj-qtkqU4-7Yz74E-5bzZe4-2aqoAo-5uTye2)

Which is done like so:

```plaintext
https://www.flickr.com/photos/kilokilo/3106467229/in/photolist-frAfDr-foY2Vw-2ogywt-Vi5rhx-65wPS1-r4h3ub-7CabKf-5aHjuJ-7KdHyk-MgHSFq-71mPRL-68nrQE-28nkP9-4T4Qh-4c5R7X-5JvstP-7CabKJ-dNSDQ9-4MfKFA-5LMykV-4hgrkz-3TaFwV-qHtcRQ-WkAzMa-pK2Zu3-4cEDPz-VUZdb6-7YtFHK-dfUrh-9kFdQf-5aEBYe-7oN4yk-r5qKak-dF71jC-7Yz6WY-7Yz6FU-7YtFMk-6hTv2d-3bAVQn-dF6TRj-93epGj-dF1tAH-pNLHfG-7sodw7-4Lpewj-qtkqU4-7Yz74E-5bzZe4-2aqoAo-5uTye2
[source](https://www.flickr.com/photos/kilokilo/3106467229/in/photolist-frAfDr-foY2Vw-2ogywt-Vi5rhx-65wPS1-r4h3ub-7CabKf-5aHjuJ-7KdHyk-MgHSFq-71mPRL-68nrQE-28nkP9-4T4Qh-4c5R7X-5JvstP-7CabKJ-dNSDQ9-4MfKFA-5LMykV-4hgrkz-3TaFwV-qHtcRQ-WkAzMa-pK2Zu3-4cEDPz-VUZdb6-7YtFHK-dfUrh-9kFdQf-5aEBYe-7oN4yk-r5qKak-dF71jC-7Yz6WY-7Yz6FU-7YtFMk-6hTv2d-3bAVQn-dF6TRj-93epGj-dF1tAH-pNLHfG-7sodw7-4Lpewj-qtkqU4-7Yz74E-5bzZe4-2aqoAo-5uTye2)

```

So I guess the feature request here is, can you always include source for image oneboxes?

Now I am not strictly against this, but not sure if it should be default behavior, I get the “automatic attribution” argument, however stuff is still attributed in the post edits if you want to dig.

---

<div class="post-metadata">

### Author: ![1101010](https://avatars.discourse-cdn.com/v4/letter/1/6de8d8/32.png) [@1101010](https://meta.discourse.org/u/1101010)
#### Post date: [29 maart 2019 om 05:30 UTC](https://meta.discourse.org/t/oneboxing-reddit-topics-with-images-isnt-working-right/112890/3 "2019-03-29T05:30:17Z")

</div>

Right, cheers for that. Having looked over the OneBox thing I can see that this is what I am expecting when posting external links. Or otherwise I just expect to see the URL displayed for someone to click on.

In these cases I think it’s that OneBox is failing because these images aren’t being downloaded so we’re getting a full hotlinking, as you say.

Now following the OneBoxing thread when I post that Reddit page into the iFramely site I get the sort of preview I’d expect to see here

> **[Welcome to Iframely](https://iframely.com/login?from=%2Fembed%2Fhttps%253A%252F%252Fwww.reddit.com%252Fr%252FHistoryPorn%252Fcomments%252F39p56o%252Fkids_jump_from_a_2nd_story_window_onto_mattresses%252F)**
>
> Get responsive embed codes for YouTube, Vimeo, Instagram, SoundCloud, Giphy and over 1900 other domains

eg:

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

So something seems to be failing. I mean yes, I _can_ provide the URL separately as I did in my original post (although I didn’t know about the ‘source’ tags, interesting) but it seems like I shouldn’t have to?

So does that mean OneBoxing is at fault or is it something else?

Thanks for the answer 🙂

---

<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: [29 maart 2019 om 05:37 UTC](https://meta.discourse.org/t/oneboxing-reddit-topics-with-images-isnt-working-right/112890/4 "2019-03-29T05:37:23Z")

</div>

You’re talking about two very different things:

1. Linking a _reddit topic_.

2. Deep linking to _a specific image in a reddit topic_.

A reddit link looks like this

`https://www.reddit.com/r/gaming/comments/b6qhgz/borderlands_3_has_thought_of_it_all/`

A reddit deep link to an image looks like this

`https://preview.redd.it/y4iazadbayo21.jpg?width=960&crop=smart&auto=webp&s=6d7dccbda555dc51b35170cd392ebed8a6c6ce80`

However you’re correct that our Reddit onebox is kind of failing here and making the whole Reddit topic look like “just an image” which it should not do. We should fix that.

(Note that this only happens for reddit topics that are image based, e.g. this works fine.)

https://embed.reddit.com/r/relationship_advice/comments/b6nhjf/my_24f_boyfriend_25m_had_a_bizarre_reaction_upon/?embed=true&ref_source=embed&ref=share

`https://www.reddit.com/r/relationship_advice/comments/b6nhjf/my_24f_boyfriend_25m_had_a_bizarre_reaction_upon/`

---

<div class="post-metadata">

### Author: ![1101010](https://avatars.discourse-cdn.com/v4/letter/1/6de8d8/32.png) [@1101010](https://meta.discourse.org/u/1101010)
#### Post date: [29 maart 2019 om 05:54 UTC](https://meta.discourse.org/t/oneboxing-reddit-topics-with-images-isnt-working-right/112890/5 "2019-03-29T05:54:43Z")

</div>

Yeah I meant specifically web links that happen to contain images being turned into an ‘orphaned’ image in the post.

I don’t normally just stick the URLs for images into the post (or the upload button option) because your fancy copy ‘n’ paste system works so well!

Cheers

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2 april 2019 om 16:03 UTC](https://meta.discourse.org/t/oneboxing-reddit-topics-with-images-isnt-working-right/112890/6 "2019-04-02T16:03:50Z")

</div>

> [@codinghorror](#):
>
> However you’re correct that our Reddit onebox is kind of failing here and making the whole Reddit topic look like “just an image” which it should not do. We should fix that.

@maja can you fix the reddit onebox with links to Reddit topic that only have an image?

We should extract the title at the very least. If possible, the author, the reddit name, the post date.

---

<div class="post-metadata">

### Author: ![rizka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rizka/32/79717_2.png) [@rizka](https://meta.discourse.org/u/rizka)
#### Post date: [5 april 2019 om 21:47 UTC](https://meta.discourse.org/t/oneboxing-reddit-topics-with-images-isnt-working-right/112890/8 "2019-04-05T21:47:15Z")

</div>

> [@Discourse 2.3.0.beta7 Release Notes](https://meta.discourse.org/t/discourse-2-3-0-beta7-release-notes/113565/2):
>
> ### One Box
> 
> - Add support for reddit posts with image type  
> [Oneboxing Reddit topics with images isn't working right](https://meta.discourse.org/t/oneboxing-reddit-topics-with-images-isnt-working-right/112890)

Testing:

https://embed.reddit.com/r/pics/comments/b9r5n2/no_one_needs_a_tusk_except_an_elephant/?embed=true&ref_source=embed&ref=share

Looks good! 👍

---

<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 april 2019 om 07:17 UTC](https://meta.discourse.org/t/oneboxing-reddit-topics-with-images-isnt-working-right/112890/9 "2019-04-06T07:17:15Z")

</div>


