Jump to content

Open Graph images (social images)


Andytizer
 Share

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?

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Forum Statistics

    1.8k
    Total Topics
    9.2k
    Total Posts
×
×
  • Create New...