WordPress.org

Making WordPress.org

Opened 4 years ago

Closed 10 months ago

Last modified 10 months ago

#3587 closed enhancement (fixed)

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 22 months ago.
Add og:image and a few other social meta tags

Download all attachments as: .zip

Change History (9)

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


22 months ago

#2 @Clorith
22 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
22 months ago

Add og:image and a few other social meta tags

#3 follow-up: @valentinbora
22 months ago

  • Keywords has-patch added

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


22 months ago

#5 in reply to: ↑ 3 @jonoaldersonwp
22 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.

#6 follow-up: @Clorith
10 months ago

These changes seem to be in place, but have gone under the radar and are not referenced in this ticket, I can't find it in the public repo, so it might be in a non-public piece of code for now.

Could you confirm things are looking good (I just used the Facebook debugger to verify that it looks as expected on social media)

#7 in reply to: ↑ 6 @dd32
10 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

Replying to Clorith:

These changes seem to be in place, but have gone under the radar and are not referenced in this ticket, I can't find it in the public repo, so it might be in a non-public piece of code for now.

I think this was actually a change in Jetpack rather than us setting it directly.

The image is probably via #5475 / #975: pub/jetpack-social-metadata.php

Looks like the only things from @jonoaldersonwp that are different are:

Add og:image:height and og:image:width tags, following the og:image tag.

Jetpack doesn't include these.

Add <meta name="twitter:card" content="summary_large_image" />

Jetpack sets these to summary.

I think this ticket is fixed enough.

#8 @jonoaldersonwp
10 months ago

Agreed; close enough!

Note: See TracTickets for help on using tickets.