Jump to content

Topic on Extension talk:OpenGraphMeta/Flow

setmainimage keeps grabbing a thumb instead of actual image

4
Tenzel Kim (talkcontribs)

When I put down {{#setmainimage:Filename.ext}} what I get in the og:image is not the actual image but a thumb of that image.

Example:

If I put down {{#setmainimage:Filename.png}} I get:

<meta property="og:image" content="http://sitename.com/wiki/images/thumb/5/5d/Filename.png/105px-Filename.png" />

instead of simply

<meta property="og:image" content="http://sitename.com/wiki/images/5/5d/Filename.png" />

Any ideas what can cause this?

Ciencia Al Poder (talkcontribs)
Tinss (talkcontribs)

Actually, 300x100 is now too small a value for Facebook, which required at least 200x200 for the og:image tag. I've submitted a bug on phabricator but if you want to fix the code yourself find OpenGraphMeta.class.php and change line 76 to:

$meta['og:image'] = wfExpandUrl( $mainImage->createThumb( 1200, 630 ) );
Tinss (talkcontribs)

The bug was fixed in change 431322. For those still having an issue with this, simply reinstall the extension.