[Mediawiki-l] Is there a way to limit the size of images uploaded

Norbert Hoeller nhoeller at sinet.ca
Wed Jan 9 16:14:45 UTC 2008


The problem is more likely to occur in a shared web server environment 
where you are limited in how much memory can be allocated to PHP.  In my 
case, my service provider claims that 20M is the maximum, although 
phpinfo() reports 40M.  As other posts have pointed out, it is the number 
of pixels that determine how large the uncompressed image is.  An other 
factor would be the color depth: 8-, 16- or 24-bit.  Displaying the images 
natively is not a problem, since the images do not need to be 
uncompressed.  I have seen indications that ImageMagick requires less 
memory than the standard GD library when creating thumbnails, but have not 
been able to test myself (standard ImageMagick install will not work in a 
shared environment).
        Norbert

> ----- Message from "Itay Ophir" <itay at worldwideworkshop.org> on Wed, 9 
Jan 2008 01:45:53 -0500 -----
> So, if someone uploads large resolution picture do ALL wikis break? or 
is it
> only some of them?
> I am trying to regroup and find a solution/cause for error.

> 2008/1/8, Grietinus Koops <grietinus at gmail.com>:
>>Thanks Itay! This worked!
>>But same as you I'm curious about the logic behind it. As there is a 
limit
>>of 20M for some reason. 2500 x 1600 pixels generates far less than
>>20MegaBytes I would say. And then it's only in case of thumbnail view...
>>
>>I'm open for suggestions :)


More information about the MediaWiki-l mailing list