Topic on Project:Support desk

How do I always have an image for my article when I share it?

4
Tribly (talkcontribs)

A lot of times when I share my articles on Facebook it either doesn't have an image or when it does it gets an image from either the middle of the page or from the bottom of the page. I tried installing the OpenGraphMeta extension and adding it's code to my infoboxes but it doesn't have any effect. I also checked the head of my pages and they doesn't have an og:image in the meta tags. What should I do in order to have the first image on my page in my posts every time I share my articles?

Stefahn (talkcontribs)

How wide is your first image? I know that, when it's below 300 pixel, chances are Facebook won't take it.

Tribly (talkcontribs)

Every infobox image on our wiki is set to have a width 280px, but those images are usually much bigger than 280px. Also, on pages that don't have an infobox the top image is usually set to be bigger than 280px, and just like with the infoboxes, the image that is linked there is much bigger originally than 280px.

Also, I have modified 47 line of the OpenGraphMeta.php of the OpenGraphMeta extension from Title::newFromDBkey($data['dbkey'], NS_FILE) to Title::newFromText($data['dbkey'], NS_FILE) and the og:image in the meta tags seems to apear now, but it still not willing to use the infobox image for a few pages, even though the image given in og:image is bigger than 300px.

Stefahn (talkcontribs)
Reply to "How do I always have an image for my article when I share it?"