Posting to reddit ends up with user photo as sourced image?

(Nicholas Perry) #1

I don’t know if this is an intended feature, something that should be addressed on discourse, or something on reddit’s end of things, but I find it weird that links to a discourse entry end up with the photo of the poster as the main image. I think this is incorrect behavior given discourse’ content first nature.

I’d love some help on figuring out ways around this. Our discourse will likely be image heavy:

So it seems silly to have user photos as the thumbnail on reddit:
[official] Arthropod Suggestions Wanted, Help /u/bersaelor brainstorm some interesting things to put into the game - Formicarium Forums : formicarium - links to the top level post, should have the ant image?

Confirmed: Aphids are planned for the game. : formicarium - links to the comment, should have the aphid as an aimage?

Is this something we can tweak? I’d be willing to look at code if you can point me in the right direction, and @Bersaelor has ruby experience.

Any help appreciated. I’m going to be digging into reddit’s codebase soon to see if there is anything I can tweak.

Open Source Rox

(Jeff Atwood) #2

You can see the result here:

Try it yourself at

And actually, I think the user avatar is a fine thing to associate with the post; that is the person who posted it, after all.


(Nicholas Perry) #3

Thanks, I think I see whats going on here (thumbnail choosing aglorithm). This will help me track down where I can put in an adjustment.

Right, but I believe its meant to be a content preview. As a user on reddit, i don’t care who posted something, I want to to see a thumbnail about the content itself so I can judge if I want to see further.

As a submitter on reddit, equally so, i’m interested in sharing the post itself, and don’t really care who made the post. The thumbnail doesn’t help me reach those goals.

Judging by the python code behind reddit, I think this to be the case as well. They are using verbage like “scrape media” - to me that has a distinct connotation referring to content.

from what i can tell, if it isn’t given an image in the meta, the heuristic tries to find the largest image in the page.

(Nicholas Perry) #4

Interestingly, when i post Improving Debate, Filtering Trolls, and The Long Now Foundation to facebook, there is no thumbnail in the tool, so facebook does effectively the same thing that reddit tries and grabs the largest image on the page.

I also notice that Improving Debate, Filtering Trolls, and The Long Now Foundation doesn’t give an avatar as thumbnail either.

has this changed?

(Jeff Atwood) #5

This was explicitly requested and that is now the behavior I’d expect to see, for reference:

(Justin Pierce) #6

It still seems to grab the thumbnail on reddit. I agree with @ultimape – I’d prefer either pulling a static image from the forum itself (logo or something, so users browsing reddit immediately know the source) or let reddit try to find an image on its own. For people on reddit, the avatar is not helpful.

I want to keep using my face as my avatar on discourse so people can see who they’re talking to, but there’s no reason to show my face on reddit when I’m sharing content (that’s probably not about me personally).

(Jeff Atwood) #7

That is the current behavior so you are requesting the way it currently works, view source if you don’t believe me.

(Justin Pierce) #8

Then I’m a little confused. Doesn’t reddit use the opengraph data?

If I understand correctly, this line is responsible for reddit using my avatar. What would reddit do if that metatag wasn’t there?

<meta content="summary" name="twitter:card" /><meta content="" property="og:image" />

(Jeff Atwood) #9

Test using this site, meta.discourse or the sandbox at try.discourse – you must be on latest to see the change.

(Justin Pierce) #10

Oh, didn’t realize it was such a recent change (I’m on 1.2.0.beta4). Sorry.

(Daniel) #11

It’s a shame you can’t say… go ahead and try to find an image on your own, but if you fail, please use this one, not the ugly one you’re about to use.

At the moment, we’re having to override the image Facebook uses with a meta tag which means we don’t get nice thumbnails when the scraping would’ve worked.

(Jeff Atwood) #12