Jump to content
Andytizer

Open Graph images (social images)

Recommended Posts

So we used to have a social tags extension custom-written which we had to disable due to some performance issues (https://github.com/PCGamingWiki/socialtags). Right now if you share an article, the social preview won't necessarily grab the correct thumbnail (we normally want the game article 'cover' image).

I was browsing around and saw that there's an extension that does OpenGraph images, it is also bundled with MW 1.34 which must mean it is stable: https://www.mediawiki.org/wiki/Extension:PageImages - should we install this?

Share this post


Link to post
Share on other sites

I don’t see why we shouldn’t try it out. I never did understand why we used a custom extension when there were multiple ones available.

But perhaps it was a different time back in the day.

Share this post


Link to post
Share on other sites

Going by the documentation, $wgPageImagesLeadSectionOnly should be enabled to ensure only images above the first section (in this case Availability) will be considered. It might also be necessary to change the resolution values to ensure any valid image will qualify (the extension page is a bit vague regarding the non-Wikimedia default values).

A ParserFunction-style way of tagging the exact image to use would still be preferable to trusting any sort of algorithm, but with a bit of tinkering this should work reliably for at least game pages and probably the company and engine pages as well.

7 minutes ago, Aemony said:

I don’t see why we shouldn’t try it out. I never did understand why we used a custom extension when there were multiple ones available.

But perhaps it was a different time back in the day.

The PageImages extension added OpenGraph support in MediaWiki 1.29, so this feature probably didn't exist at that time.

Share this post


Link to post
Share on other sites
2 hours ago, Garrett said:

A ParserFunction-style way of tagging the exact image to use would still be preferable to trusting any sort of algorithm, but with a bit of tinkering this should work reliably for at least game pages and probably the company and engine pages as well.

Wasn't that what broke the old plugin to begin with? It had a very simple parserfunction-style call that somehow was enough to break stuff that weren't even supposed to run at the same time.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Found PCGamingWiki useful? Please consider making a Donation or visiting our Patreon.
  • Who's Online   2 Members, 0 Anonymous, 293 Guests (See full list)

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Forum Statistics

    1,372
    Total Topics
    7,431
    Total Posts
×
×
  • Create New...