[MediaWiki-l] Image thumbnailing in MediaWiki

Brian Wolff bawolff at gmail.com
Sat Jul 29 00:22:36 UTC 2017


Hi,

MediaWiki will by default only create image thumbs for needed sizes at
time the size is used on a page. So for example when you add an image
to a page, MW will create the thumbnail sizes needed to display an
article. However, if the image is uploaded but never added to a normal
page, then thumbnails for the image won't be generated (except for
those needed on image description page, which are different sizes)

There is a second mode mediawiki can operate in, where images are
rendered on demand when someone views the image (so-called "404 thumb
handling"). Wikimedia wikis use this mode. In this mode, thumbs are
created on first view. Additionally in this mode, $wgImageLimits
creates additional links on the image description page. This mode is
generally more efficient (especially on page saves), and also more
reliable in the event that there is a missing thumb.

For information to set up 404-thumb rendering see
https://www.mediawiki.org/wiki/Manual:Thumb.php

--
Brian

On Fri, Jul 28, 2017 at 9:18 AM, Krabina Bernhard <krabina at kdz.or.at> wrote:
> Dear MediaWiki experts,
>
> I cannot really figure out the behaviour of MediaWiki regarding thumbnailing. What I want to achieve is that my MediaWiki installation produces thumbnails in a specified size.
>
> What I did after reading through several help pages is this:
> ---------------------------
> # Images und Thumbnails
> $wgThumbLimits = array( 80, 250, 390 );
> $wgDefaultUserOptions['thumbsize'] = 1; // thumb size 250
>
> $wgImageLimits = array( array( 80, 90 ), array( 800, 600 ), array( 1280, 1024 ) );
> $wgDefaultUserOptions['imagesize'] = 2; // image size 800, 600
> ---------------------------
>
> In my opinion this should guarantee that for every image uploaded, there is an 80, 250 and 390px sized thumbnail. In many cases this is true, but there are some cases were I can find a 100px thumbnail, but no 80px thumbnail.
>
> If I understand it correctly, this can perfectly be the case if any user sets his/her preference to 100px. I don't mind so much extra sizes to be produced, but I want to make sure that a 80px thumbnail is there.
>
> Maybe in the cases where it is not present the images were uploaded before the above mentioned setting was made? But how can I get the wiki to redo thumbnails in my desired size?
>
> cheers,
> Bernhard
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l



More information about the MediaWiki-l mailing list