Add support for better oneboxing of Reddit images?

Not sure if this is expected and how to check if it is, but sometimes the oneboxing of reddit topics returns a properly formatted Onebox, like in this case:
https://www.reddit.com/r/spacex/comments/ain1kk/elon_musk_why_im_building_the_starship_out_of/

whereas some other time we just get the topic thumbnail/first-post picture, like here
https://www.reddit.com/r/SpaceXLounge/comments/airsly/crew_dragon_on_the_pad_ahead_of_tomorrows_static/

Is this an intended behavior?

Yes it’s intended (or at least explainable).

First one is a comment with a link to another page.
Second on is a comment with an image embedded in.

4 Likes

Thanks @joffreyjaffeux.
I understand the concept, but still my opinion is that in the second case it’s a pity not to have this enclosed in a proper OneBox that would have the some elements of the first oneboxing (a squared box, a mini reddit logo and website name).
The second oneboxing is indistinguishable from an embedded hardlinked image, which does not provide elements to give proper credits and reference to the source. This might be seen as being rude to the person that published his material on reddit and that we want to embed OneBox in our forum giving proper reference.
Certainly I can provide the link to the post in a separated raw, but still…

We’re displaying what Reddit is asking us to display. FIrst link:

Tag Content
og:site_name reddit
og:title r/spacex - Elon Musk: Why I’m Building the Starship out of Stainless Steel
og:type website
og:url https://www.reddit.com/r/spacex/comments/ain1kk/elon_musk_why_im_building_the_starship_out_of/
og:description 8,335 votes and 1,452 comments so far on Reddit
og:image https://external-preview.redd.it/bbE7P0-WGeBQHfWQ4iYUv63Kliri7AKXYYnPq-xZC1s.jpg?auto=webp&s=065d000b6ad6dec9f740c9340b0a496b70d09b66
og:image:width 415
og:image:height 208

Second link:

Tag Content
og:site_name reddit
og:title r/SpaceXLounge - Crew Dragon on the pad ahead of tomorrow’s static fire test.
og:type image
og:url https://www.reddit.com/r/SpaceXLounge/comments/airsly/crew_dragon_on_the_pad_ahead_of_tomorrows_static/
og:description 607 votes and 53 comments so far on Reddit
og:image https://preview.redd.it/qet22w9pl1c21.jpg?auto=webp&s=1f488e4fd3577fc60399d71fcba012f65ca67e0c
og:image:width 2250
og:image:height 4000

Seems like you’d perhaps prefer it to look like what Instagram does (note the different og:type)? I can see the argument for that.

Tag Content
og:site_name Instagram
og:title Instagram post by Taylor Buley • Mar 18, 2014 at 10:06pm UTC
og:image https://scontent-frx5-1.cdninstagram.com/vp/92b7df3d109a4ded56a53f408b85a374/5CE2142E/t51.2885-15/e15/11248375_1434033010252199_777127894_n.jpg?_nc_ht=scontent-frx5-1.cdninstagram.com
og:description 2 Likes, 0 Comments - Taylor Buley (@taylorbuley) on Instagram
fb:app_id 124024574287414
og:url Instagram post by Taylor Buley • Mar 18, 2014 at 10:06pm UTC
og:type instapp:photo
3 Likes

First of all, thanks for the extensive clarification! :clap:

To answer your question, yes, this Instagram example would perfect (and imvho also better looking).

Both cases are now working fine:

The second case has a broken image, but it’s reddit having an og:image property with an URL returning a 403, :man_shrugging: not much we can do.EDIT: seems like it’s working now :mage:

5 Likes