Extension talk:PageImages

Jump to navigation Jump to search

About this board (talkcontribs)

Don't displayed images from infoboxes, please hepl to fix this.

Reply to "images from infoboxes"
Titanshadow (talkcontribs)

So I've been using the OpenGraphMeta extension for ages now. As such most of my wiki has the #setmainimage tag for that extension, which seems to no longer work. I've been removing it from templates, which is most of the wiki's usage of the tag, which is fine. The problem is that if I remove it from the template, the wiki doesn't seem to load the image property unless I edit the individual page. Is it possible to force-update the entire wiki to load image properties for every single page?

Tinss (talkcontribs)

The #setmainimage tag still works, it's just that this extension overrides the og:image it defines with its own.

Have you tried deleting the entire wiki cache to force every page to be regenerated?

Reply to "Updating entire wiki..."
Alzi24 (talkcontribs)

In Extension:PageImages#How_are_images_scored?, there are several parameters that can be set to configure the scoring. But there is no description of the valid values and the defaults.

Reply to "The algorithm is configurable ..."
Draceane (talkcontribs)

Hello, is there any option to skip some images (e. g. from sidebar)? These aren't very representative at all...

Reply to "Loading image from sidebar" (talkcontribs)

I would like to use the Extension to insert in a template. So a reference-link could Show the and a Image.

Is there any tag or ability to make this happen with this Extension?

Reply to "Tag useage of the Exstension"

Manually trigger LinksUpdate on all Aritcles

Mojoaxel (talkcontribs)

The Extension works fine and I'm very happy with it. The question now is how to trigger the Plugin on all Articles. At the moment only images are shown after I changes an Article.

Is there a way to trigger LinksUpdate on all Articles manually?

Varlin (talkcontribs)

+1. It would be a basic feature... (talkcontribs)

Hey, it is possible to do it manually. I am currently having MediaWiki 1.31.

To manually trigger this for all articles you have to start the initImageData.php in extensions/PageImages/maintenance/ folder. I do not have shell/ssh support on my provider, so I had to use MaintenanceShell extension and change the $wgMaintenanceShellPath to the mentioned path.

It looks like there is also some problem (at least on my server) with the script and I couldnt get it work properly. After some debugging I saw that I had to change LinksUpdateHookHandler.php (in PageImages/includes/) the following:

$rev = $linksUpdate->getRevision();


$rev = Revision::newFromTitle($linksUpdate->getTitle());

And I managed to get all images on preview (using the Popups/PagePreviews extension)

Hope it helps someone

Pastakhov (talkcontribs)


Reply to "Manually trigger LinksUpdate on all Aritcles"
Bryandamon (talkcontribs)

After installing, none of my page images get added, and when I run PageImages/maintenance/initImageData.php I get the following warnings:

PHP Warning: array_flip(): Can only flip STRING and INTEGER values! in /htdocs/extensions/PageImages/includes/ParserFileProcessingHookHandlers.php on line 123
PHP Warning: array_flip(): Can only flip STRING and INTEGER values! in /htdocs/extensions/PageImages/includes/ParserFileProcessingHookHandlers.php on line 123

Reply to "PHP Warning on MW 1.31"

Exclude images in <ref> tags from being used.

1 (talkcontribs)

Annoyingly several pages use images placed inside references as the page image. I have tried to put these in blacklists or otherwise force the first image to be selected, however it would be nice to exclude images from references.

Reply to "Exclude images in <ref> tags from being used."
Geraki (talkcontribs)

So, is there any chance for including Open Graph in the page itself?

<meta property="og:image" content="http://example.com/w/images/thumb/7/70/Example.png/48px-Example.png" />

I hope so.

MaxSem (talkcontribs)

Frankly, I'm a bit wary of adding more cruft to page HTML. Is there a demand for this?

Nemo bis (talkcontribs)

If that's really used by Facebook I must say that I hate it, but from a MediaWiki/Wikimedia perspective making pages look better when linked on it seems enough of a good reason.

Geraki (talkcontribs)

It seems essential if we prefer that links to Wiki[pm]edia pages are presented with an appropriate thumbnail instead of the mediawiki logo or 'featured article' sign.

In fact it will be helpful not only to wikipedia but to every wiki, so at least there should be an option to enable/disable it.

Florianschmidtwelzow (talkcontribs)

The Open Graph Extension adds an image for og:image, using the MainImage of $out (mMainImage). Maybe the developer can use the Image of pageImages, that is much better as the first main Image on page :)

Nemo bis (talkcontribs)

Yes, we've seen quite a demand for this lately and it would be nice.

Hollosch (talkcontribs)

Hi, have you found a solution to including the og:image property?

Stefahn (talkcontribs)

Just came across this. You can add an og:image to your site by the following code in your LocalSettings.php:

$wgHooks['BeforePageDisplay'][] ='MyFunction';
function MyFunction(&$out, &$skin) {
    $script = "<meta property='og:image' content='/pics/YourPic.png'>";
    $out->addHeadItem("My script", $script);
    return true;


Be aware that this will set YourPic.png as og:image in all of your pages.

If you want to set og:image only on your Main page see User:Stefahn/Docu#Get_the_title_of_a_page.

Reply to "Open Graph image?"

Image inside RandomSelection (aka <choose>) always selected over other images

Ciencia Al Poder (talkcontribs)

I'm writing this here in case someone has the same problem

On our main page, we had a section that varies randomly with Extension:RandomSelection, and for some unknown reason, the image chosen was always an image from the random selection instead of the logo of our wiki that was placed at the start of the page.

We had to add the logo inside another random selection (with just one option) to make it selectable by the PageImages extension.

Reply to "Image inside RandomSelection (aka <choose>) always selected over other images"