Re: [MediaWiki-l] Image thumbnailing in MediaWiki

2017-08-08 Thread [[kgh]]
Oops, all your mails went directly to the spam folder. Sorry for the
belated reply and thank you for your suggestions and feedback.

I should definitively give it a shot again and in case of failure
together with error logging. :) Fresh wikis are painless so I guess that
I know how to set up a working handler.

I remember a 1.23 giving me pain with no thumbs rendered but this one
was the source of a foreign file repo. So this may have been the reason.
Moreover I remember other issues with file handling in that branch. Also
there was a 1.27 with no thumbs rendered for the files uploaded before
the switch but working for files uploaded after the switch. That's
basically why I got the idea that existing thumbs will probably have to
be cleared. That wiki is now on 1.29 and working cool though.

Cheers Karsten

Am 01.08.2017 um 20:12 schrieb Brian Wolff:
> It should be fine to switch over an existing wiki, and ive done it
> before. I think its more likely something else was wrong, some config
> missing (if you had custom wgLocalFileRepos the config changes. If you
> have custom wgForeignFileRepos things may get more complicated. Older
> versions of mediawiki had an issue with wgUseInstantCommons being
> incompatible with 404 rendering, but that should be fixed now) or some
> weird incompatibility with something else.
>
> I know you wouldnt have them anymore, but mediawiki can be configured
> to generate logs that can be used to debug this sort of thing, and
> going directly to the thumb file in 404 rendering mode can also give
> helpful error messages.
>
> --
> bawolff
>
> On Tuesday, August 1, 2017, [[kgh]]  > wrote:
> > Building up on this information:
> >
> > I have once tried to switch from "regular thumb handling" to "404 thumb
> > handling" on an existing wiki and found that this does not work since as
> > a result no thumbs were rendered at all. Starting with "404 thumb
> > handling" on a fresh wiki however works fine. I have not dug into this
> > more but may it be that all existing thumbs have to be deleted to clear
> > the way for the new handling mode when switching the mode on wiki
> > already in use?
> >
> > Cheers Karsten
> >
> >
> > Am 31.07.2017 um 15:52 schrieb Brian Wolff:
> >> Thumbnails will generally not be deleted except if an image is deleted,
> >> overwritten with another file or purged (ie appending ?action=purge
> to the
> >> file description page)
> >>
> >> --
> >> bawolff
> >>
> >> On Monday, July 31, 2017, Krabina Bernhard  > wrote:
> >>> Dear all,
> >>>
> >>> thank you for your help, it is much appreciated.
> >>>
> >>> An additional question regarding thumbnailing: do thumbs ever get
> deleted
> >> by MediaWiki?
> >>> They probably get deleted once the image gets deleted. But other than
> >> that, do all generated thumbnails exist as long as the image exists?
> >>> cheers,
> >>> Bernhard
> >>>
> >>>
> >>> - Am 29. Jul 2017 um 2:22 schrieb Brian Wolff
> bawo...@gmail.com :
> >>>
>  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
> mailto:krab...@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
> > -

Re: [MediaWiki-l] Image thumbnailing in MediaWiki

2017-08-01 Thread Brian Wolff
It should be fine to switch over an existing wiki, and ive done it before.
I think its more likely something else was wrong, some config missing (if
you had custom wgLocalFileRepos the config changes. If you have custom
wgForeignFileRepos things may get more complicated. Older versions of
mediawiki had an issue with wgUseInstantCommons being incompatible with 404
rendering, but that should be fixed now) or some weird incompatibility with
something else.

I know you wouldnt have them anymore, but mediawiki can be configured to
generate logs that can be used to debug this sort of thing, and going
directly to the thumb file in 404 rendering mode can also give helpful
error messages.

--
bawolff

On Tuesday, August 1, 2017, [[kgh]]  wrote:
> Building up on this information:
>
> I have once tried to switch from "regular thumb handling" to "404 thumb
> handling" on an existing wiki and found that this does not work since as
> a result no thumbs were rendered at all. Starting with "404 thumb
> handling" on a fresh wiki however works fine. I have not dug into this
> more but may it be that all existing thumbs have to be deleted to clear
> the way for the new handling mode when switching the mode on wiki
> already in use?
>
> Cheers Karsten
>
>
> Am 31.07.2017 um 15:52 schrieb Brian Wolff:
>> Thumbnails will generally not be deleted except if an image is deleted,
>> overwritten with another file or purged (ie appending ?action=purge to
the
>> file description page)
>>
>> --
>> bawolff
>>
>> On Monday, July 31, 2017, Krabina Bernhard  wrote:
>>> Dear all,
>>>
>>> thank you for your help, it is much appreciated.
>>>
>>> An additional question regarding thumbnailing: do thumbs ever get
deleted
>> by MediaWiki?
>>> They probably get deleted once the image gets deleted. But other than
>> that, do all generated thumbnails exist as long as the image exists?
>>> cheers,
>>> Bernhard
>>>
>>>
>>> - Am 29. Jul 2017 um 2:22 schrieb Brian Wolff bawo...@gmail.com:
>>>
 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 
>> 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
 ___
 MediaWiki-l mailing list
 To unsubscribe, go to:
 https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>> ___
>>> MediaWiki

Re: [MediaWiki-l] Image thumbnailing in MediaWiki

2017-08-01 Thread Greg Rundlett (freephile)
On Tue, Aug 1, 2017 at 10:51 AM, [[kgh]]  wrote:

> Building up on this information:
>
> I have once tried to switch from "regular thumb handling" to "404 thumb
> handling" on an existing wiki and found that this does not work since as
> a result no thumbs were rendered at all. Starting with "404 thumb
> handling" on a fresh wiki however works fine. I have not dug into this
> more but may it be that all existing thumbs have to be deleted to clear
> the way for the new handling mode when switching the mode on wiki
> already in use?
>
> Cheers Karsten
>

I haven't tried it, but would think that you can switch to using  a 404
handler.  However, the documentation says that you should also set
$wgGenerateThumbnailOnParse to false. [1]

[1] https://www.mediawiki.org/wiki/Manual:Thumb.php


Greg Rundlett
https://QualityBox.us
https://freephile.org
___
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Re: [MediaWiki-l] Image thumbnailing in MediaWiki

2017-08-01 Thread Bill Traynor
Wouldn't deleting the thumb subfolder regenerate them on an as needed basis?

On Tue, Aug 1, 2017 at 10:51 AM, [[kgh]]  wrote:
> Building up on this information:
>
> I have once tried to switch from "regular thumb handling" to "404 thumb
> handling" on an existing wiki and found that this does not work since as
> a result no thumbs were rendered at all. Starting with "404 thumb
> handling" on a fresh wiki however works fine. I have not dug into this
> more but may it be that all existing thumbs have to be deleted to clear
> the way for the new handling mode when switching the mode on wiki
> already in use?
>
> Cheers Karsten
>
>
> Am 31.07.2017 um 15:52 schrieb Brian Wolff:
>> Thumbnails will generally not be deleted except if an image is deleted,
>> overwritten with another file or purged (ie appending ?action=purge to the
>> file description page)
>>
>> --
>> bawolff
>>
>> On Monday, July 31, 2017, Krabina Bernhard  wrote:
>>> Dear all,
>>>
>>> thank you for your help, it is much appreciated.
>>>
>>> An additional question regarding thumbnailing: do thumbs ever get deleted
>> by MediaWiki?
>>> They probably get deleted once the image gets deleted. But other than
>> that, do all generated thumbnails exist as long as the image exists?
>>> cheers,
>>> Bernhard
>>>
>>>
>>> - Am 29. Jul 2017 um 2:22 schrieb Brian Wolff bawo...@gmail.com:
>>>
 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 
>> 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
 ___
 MediaWiki-l mailing list
 To unsubscribe, go to:
 https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>> ___
>>> MediaWiki-l mailing list
>>> To unsubscribe, go to:
>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>>
>> ___
>> MediaWiki-l mailing list
>> To unsubscribe, go to:
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
>
> ___
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

___
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Re: [MediaWiki-l] Image thumbnailing in MediaWiki

2017-08-01 Thread [[kgh]]
Building up on this information:

I have once tried to switch from "regular thumb handling" to "404 thumb
handling" on an existing wiki and found that this does not work since as
a result no thumbs were rendered at all. Starting with "404 thumb
handling" on a fresh wiki however works fine. I have not dug into this
more but may it be that all existing thumbs have to be deleted to clear
the way for the new handling mode when switching the mode on wiki
already in use?

Cheers Karsten


Am 31.07.2017 um 15:52 schrieb Brian Wolff:
> Thumbnails will generally not be deleted except if an image is deleted,
> overwritten with another file or purged (ie appending ?action=purge to the
> file description page)
>
> --
> bawolff
>
> On Monday, July 31, 2017, Krabina Bernhard  wrote:
>> Dear all,
>>
>> thank you for your help, it is much appreciated.
>>
>> An additional question regarding thumbnailing: do thumbs ever get deleted
> by MediaWiki?
>> They probably get deleted once the image gets deleted. But other than
> that, do all generated thumbnails exist as long as the image exists?
>> cheers,
>> Bernhard
>>
>>
>> - Am 29. Jul 2017 um 2:22 schrieb Brian Wolff bawo...@gmail.com:
>>
>>> 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 
> 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
>>> ___
>>> MediaWiki-l mailing list
>>> To unsubscribe, go to:
>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>> ___
>> MediaWiki-l mailing list
>> To unsubscribe, go to:
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
> ___
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


___
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Re: [MediaWiki-l] Image thumbnailing in MediaWiki

2017-07-31 Thread Brian Wolff
Thumbnails will generally not be deleted except if an image is deleted,
overwritten with another file or purged (ie appending ?action=purge to the
file description page)

--
bawolff

On Monday, July 31, 2017, Krabina Bernhard  wrote:
> Dear all,
>
> thank you for your help, it is much appreciated.
>
> An additional question regarding thumbnailing: do thumbs ever get deleted
by MediaWiki?
> They probably get deleted once the image gets deleted. But other than
that, do all generated thumbnails exist as long as the image exists?
>
> cheers,
> Bernhard
>
>
> - Am 29. Jul 2017 um 2:22 schrieb Brian Wolff bawo...@gmail.com:
>
>> 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 
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
>>
>> ___
>> MediaWiki-l mailing list
>> To unsubscribe, go to:
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
> ___
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
___
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Re: [MediaWiki-l] Image thumbnailing in MediaWiki

2017-07-31 Thread Krabina Bernhard
Dear all,

thank you for your help, it is much appreciated.

An additional question regarding thumbnailing: do thumbs ever get deleted by 
MediaWiki?
They probably get deleted once the image gets deleted. But other than that, do 
all generated thumbnails exist as long as the image exists?

cheers,
Bernhard


- Am 29. Jul 2017 um 2:22 schrieb Brian Wolff bawo...@gmail.com:

> 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  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
> 
> ___
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

___
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Re: [MediaWiki-l] Image thumbnailing in MediaWiki

2017-07-30 Thread Robert Vogel
Hi Bernhard,


I believe bawolff's explanations to use the "thumb.php" (plus the 404 handler) 
as an entrypoint is probably the best approach. If you still need for some 
reason those files to be always available on the disk, it should be easy to 
write a maintenance script that runs over all the files in your repo and 
creates the desired thumb sizes. It can be done with MediaWiki framework 
functions (`wfFindFile($title)->createThumb( $width, $height )`). This could 
also be done within the "UploadComplete" [1] hook.


[1] https://www.mediawiki.org/wiki/Manual:Hooks/UploadComplete


--

Robert



Von: MediaWiki-l  im Auftrag von 
Krabina Bernhard 
Gesendet: Freitag, 28. Juli 2017 11:18
An: mediawiki-l@lists.wikimedia.org
Betreff: [MediaWiki-l] Image thumbnailing in MediaWiki

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
MediaWiki-l Mailing List - 
Wikimedia
lists.wikimedia.org
MediaWiki-l MediaWiki announcements and site admin list. This is a multilingual 
list for help/support with running/configuring MediaWiki. It is intended for 
people ...


___
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Re: [MediaWiki-l] Image thumbnailing in MediaWiki

2017-07-30 Thread Brian Wolff
I should probably add to this, i believe (its been a while since i looked
at the code and i didnt double check), that in default generate thumbs on
parse mode, mediawiki will only generate the thumbs required at parse time
given the user options set for that parse. So if you are using an image
with default thumb size in a page, and there is a thumb size preference
that nobody uses, then that thumb size will never be generated.

--
bawolff

On Friday, July 28, 2017, Brian Wolff  wrote:
> 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 
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
>
___
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Re: [MediaWiki-l] Image thumbnailing in MediaWiki

2017-07-28 Thread Brian Wolff
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  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

___
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l