Hello! How to get the list of all pages on wiki that don't have pageimage?
Extension talk:PageImages
One way is via a Quarry query such as this one. Registered users can fork the query and adjust it to their wishes.
Hi, On our wiki, a lot of our images are 150 x 150 images, and we'd like to get these considered to be page images for articles.
I've looked at the setting for width, but I'm not sure exactly what kind of scoring I should set for that. Would something like this work?
$wgPageImagesScores['width']= {
"119": -100,
"150": 11,
"400": 10,
"600": 5,
"601": 0
};
Images down to 120px are allowed by default. Your code only makes a difference if you prefer 120-150px against more than 150px on pages with multiple images. I didn't find any page with a page image in your wiki, and https://buttonmen.miraheze.org/wiki/Main_Page has a 300px image. https://buttonmen.miraheze.org/wiki/Special:Version says PageImages is installed. Have you run "initImageData.php" per Extension:PageImages#Installation?
Page Previews rejects some small images which have been selected as page image: Extension:Popups#Known problems. Topic:X24ym9nooumpgr1h tries to state the requirement more clearly. There is an example here: How come some images show up while hovering on some articles and on others they do not? Popups is a different extension but it's a prominent use of PageImages and can confuse users so I suggest a brief mention here, maybe my opening sentence.
It shows up in Special:Version
https://mysterydungeonwiki.com/wiki/Special:Version
I've added "$wgPageImagesNamespaces" along with a list of all of my wiki's custom namespaces and it's not working.
https://mysterydungeonwiki.com/wiki/Shiren:Blacksmith?action=info
I've ran "cd w/maintenance /php update.php". and refreshLinks.php and that didn't seem to do anything. I'm out of ideas
https://mysterydungeonwiki.com/wiki/Special:AllPages shows mainspace pages. It works there, e.g. https://mysterydungeonwiki.com/wiki/Mystery_Dungeon_Wiki/Latest_Game?action=info
It's only enabled in mainspace by default. What is your code for $wgPageImagesNamespaces? Do you have evidence that other code in the file is used?
> wfLoadExtension( 'PageImages' );
> $wgPageImagesExpandOpenSearchXml = true;
> $wgPageImagesLeadSectionOnly = true;
$wgPageImagesNamespaces = array( -1 => 0, 0 => 1, 1 => 0,
2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, 11 => 0, 3000 => 0, 3002 => 0, 3004 => 0, 3006 => 1, 3008 => 1,
3018 => 1, 3020 => 1, 3022 => 1, 3024 => 1, 3026 => 1, 3028 => 1, 3030 => 1, 3030 => 1, 3032 => 1, 3034 => 1, 3036 => 1, 3038 => 1,
3040 => 1, 3042 => 1, 3044 => 1, 3046 => 1, 3048 => 1, 3050 => 1, 3052 => 1, 3054 => 1, 3056 => 1, 3058 => 1, 3060 => 1,
3062 => 1, 3064 => 1, 3066 => 1, 3068 => 1, 3070 => 1, 3072 => 1, 3074 => 1, 3076 => 1, 3078 => 1, 3080 => 1, 3082 => 1,
3084 => 1, 3086 => 1, 3088 => 1, 3090 => 1, 3094 => 1, 3096 => 1, 3098 => 1, 3100 => 1, 3102 => 1, 3104 => 1, 3106 => 1,
3108 => 1, 3110 => 1, 3112 => 1, 3114 => 1, 3116 => 1, 3118 => 1, 3120 => 1, 3122 => 1, 3124 => 1, 3126 => 1, 3128 => 1,
3130 => 1, 3132 => 1, 3134 => 1, 3136 => 1, 3138 => 1, 3140 => 1, 3142 => 1, 3144 => 1, 3146 => 1, 3148 => 1, 3150 => 1,
3152 => 1, 3154 => 1, 3156 => 1, 3158 => 1, 3160 => 1, 3162 => 1, 3164 => 1, 3166 => 1, 3168 => 1, 3170 => 1, 3172 => 1,
3174 => 1 );
I also tried the following, which didn't work.
$wgPageImagesNamespaces[] = 3036;
Try to merely list the wanted namespaces: array(0, 3006, 3008, ..., 3036, ...)
I load in one of my wikis by some templates external images and data via automatically generated or embedded links. the pageview works flawless, but PageImages doesn't regognize them. I assume, that the listing is limited to internal files with comparision of blacklist etc.
But i have to ask for a simple solution, is there an option to allow external imagefiles to be set as PageImages, if i can set it on a "hard wire" maybe via magic word or as antonym to |class=notpageimage
that would be easy to add in one of the templates.
The images in PageImage need to be internal, because they're used in various places, like search suggestions and related articles, which need to thumbnail the image to a specific size. This of course won't work if those images are external.
A deployment of all images to a wiki to get this function is not very efficent nor sensefull, it means hold the files in several places. So thanks for reply, but it means it isn't as useful in my case.
Open is the point if i can hardwire the selection by parameter or sth.
The code on the extension page doesn't help at all. It shows links, but doesn't tell me WHERE to put them. On top of that, my logo is in the assets folder, so how do I remove it when it's not a file I can link to? Everything I try, breaks the wiki until I remove the code.
This post was hidden by Korra II Royal (history)
If your post is about an unwanted page image seen with action=info then please link an example page with the problem.
https://mysterydungeonwiki.com/wiki/Mystery_Dungeon_Franchise_Wiki
My co-admin made a widget, which I believe currently overrides it.
https://mysterydungeonwiki.com/wiki/Mystery_Dungeon_Franchise_Wiki?action=info currently shows https://mysterydungeonwiki.com/wiki/File:Shiren_the_Wanderer_-_The_Tower_of_Fortune_and_the_Dice_of_Fate_iPad_banner.png, I don't know whether this is unwanted.
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.
Frankly, I'm a bit wary of adding more cruft to page HTML. Is there a demand for this?
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.
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.
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 :)
Yes, we've seen quite a demand for this lately and it would be nice.
Hi, have you found a solution to including the og:image property?
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.
How do I refresh the page to see the meta property change in LocalSettings.php to know if it's working?
This page will inspect the url for og: metadata:
The Albert Einstein example does not work because that page does not exists on mediawiki. All sandbox examples should be checked
I use Extension:Webp which automatically converts all images to webp format. Huge advantage for the speed of loading the pages.
But since then, no more images recognized by Extension:PageImages... The extension does not recognize the webp format? Is there a solution?
Hello,
I added class=notpageimage to all the images inside an infobox, as I want the Previews extension to show images picked from the body of the page. The infobox contains Cargo fields.
Nonetheless, PageImages keeps on pulling images from the Infobox.
I am using MW 1.37.2, Cargo 3.2.
Thanks!
This is included in REL1_38 or master branch of this extension.
Thanks
Hello, I updated to MW1.38.1 but still not working for me.
Any idea?
Thank you in advance.
Carlo
My bad, it's working now. Forgot to run initImageData.php