cookywook
(Richard Cook)
2019 年12 月 20 日 11:11
1
When we share forum posts elsewhere, the open graph image defaults to the avatar of the poster, which doesn’t look great.
Is there a way to change it to something else by default?
I searched for other posts on this and only found this, which didn’t get answered:
If a user posts a link to a topic on social media or something like that often an image is loaded.
My discourse installation per default displays the autor profile picture of the last editor in this topic.
Is there any way to change this to the forum logo?
2 个赞
david
(David Taylor)
2019 年12 月 20 日 11:20
2
If you head to the “branding” tab of your site settings, you will find various places to upload logos. If you update the ‘large icon’, it will propagate to all the other sharing icons.
4 个赞
david
(David Taylor)
2019 年12 月 20 日 11:41
3
I just took a look at the code, and I guess you are talking about the case when you share a specific post URL. For example, if I share the link to this topic, it would look like (using the twitter card validator )
However, if I share the permalink to my reply, we get my profile picture:
I think in this case we should prioritise the default opengraph image over the avatar. What do you think @zogstrip ?
3 个赞
cookywook
(Richard Cook)
2019 年12 月 20 日 11:51
5
david:
I just took a look at the code, and I guess you are talking about the case when you share a specific post URL. For example, if I share the link to this topic, it would look like (using the twitter card validator )
I meant exactly this, correct!
3 个赞
zogstrip
(Régis Hanol)
2019 年12 月 20 日 12:03
6
So this would be: first image in the post open graph image poster avatar?
I guess poster avatar will almost never show…
But I think having the open graph image makes more sense
3 个赞
david
(David Taylor)
2019 年12 月 20 日 12:04
7
I was actually thinking of removing the post avatar entirely. Almost every site will have some kind of opengraph image set. I don’t think anyone really wants profile pictures showing up as link previews anyway:
https://github.com/discourse/discourse/pull/8605
3 个赞
david
(David Taylor)
2019 年12 月 20 日 14:15
8
This change is now made. Links to replies will now fall back in the same way as links to the topic itself. So my reply above now looks like:
I’ve just deployed this change to your hosted site @cookywook - thanks for starting the discussion!
6 个赞
cookywook
(Richard Cook)
2019 年12 月 20 日 14:30
9
Amazing, thanks for the hyper-speedy turnaround
3 个赞
cookywook
(Richard Cook)
2019 年12 月 20 日 14:45
10
One more thing, sorry, do you know why it makes just a little image rather than the big one you’d get if you shared the whole thread?
1 个赞
david
(David Taylor)
2019 年12 月 20 日 14:46
11
Hmm not sure, do you have an example link? (feel free to PM if you’d rather not post it in public)
1 个赞
david
(David Taylor)
关闭
2019 年12 月 23 日 18:09
19
This topic was automatically closed after 3 days. New replies are no longer allowed.