WordPress.org

Making WordPress.org

Opened 3 years ago

Last modified 10 months ago

#3587 accepted enhancement

Default image when sharing forum topics on social networks

Reported by: felipeelia Owned by: Clorith
Milestone: Priority: low
Component: Support Forums Keywords: has-patch
Cc:

Description

While sharing this forum topic on Facebook, I've noticed that differently from what happens when we share a /news blog post, there is not a default image with it. As a fallback, Facebook tries to get the first image, so the topic is displayed with the user avatar (in this case a random image).

Can we use some default image for these cases too?

Attachments (1)

3587.diff (1.8 KB) - added by valentinbora 10 months ago.
Add og:image and a few other social meta tags

Download all attachments as: .zip

Change History (6)

This ticket was mentioned in Slack in #forums by clorith. View the logs.


10 months ago

#2 @Clorith
10 months ago

  • Keywords 2nd-opinion removed
  • Owner set to Clorith
  • Status changed from new to accepted

This makes sense to me, since we some times get incorrectly marked gravatars, and it feels like we're "promoting" user-generated content by gratavars showing up

This should probably just be set so that all forum links return the WP logo.

@valentinbora
10 months ago

Add og:image and a few other social meta tags

#3 follow-up: @valentinbora
10 months ago

  • Keywords has-patch added

This ticket was mentioned in Slack in #forums by valentinbora. View the logs.


10 months ago

#5 in reply to: ↑ 3 @jonoaldersonwp
10 months ago

Some requested patch tweaks:

  • Ensure that the site name isn't part of the og:title. E.g., it should always be "Cat pictures", rather than "Cat pictures | My cat blog".
  • Add a query busting parameter all media assets. E.g., the image URL should append ?v={{ver}}, so that we can change/update more easily in the future.
  • Add an og:type tag, with a value of article.
  • Add an og:description tag, with a value of the page's meta description.
  • Add og:image:height and og:image:width tags, following the og:image tag.
  • Add an og:url tag which echoes the canonical URL tag of the page.
  • Remove the twitter:text:title tag; it's redundant.
  • Add <meta name="twitter:card" content="summary_large_image" />

Probably more tweaks to come, but that'll make it a bit more robust for now.

Note: See TracTickets for help on using tickets.