[Mediawiki-l] LightboxThumbs Extension and Resizing Images

Henry Hartley henry at dotrose.com
Wed Mar 10 17:25:08 UTC 2010


I've recently installed the LightboxThumbs extension on a couple wikis 
and like it pretty well. One significant problem (or lack of a solution, 
anyway) is that the full size image is displayed in the image pop-up and 
if the images you upload are large, it's not really very usable. Of 
course, it's possible to upload two sets of images, one large and one 
for use in galleries but since mediawiki already resizes images so well, 
and since managing multiple sets of images just seems wrong, I wondered 
if there would be some way to automate this.

What I was thinking was that when you go to an image's page you get a 
scaled image on the page rather than the full size image (unless the 
image is less than a certain size). Would there be some way for the 
gallery code to automatically use that scalled image instead of the full 
size image? So, I guess what I need is the code that looks for the 
original image, checks its size and then decides what size to return to 
the user.

Another thought I had was to write a new extension that creates a 
totally new tag rather than rewriting the HTML generated by the 
<gallery> tag. The advantage of that would be that you could have both 
sorts of galleries on a site or even on a single page. I'd guess that to 
do that I'd want to use code similar to what is done now by the standard 
<gallery> code but have it work when something like <lightboxgallery> is 
used instead. So, where should I look for the <gallery> code?

I hope that all makes sense. I've done a fair amount of PHP work but 
frankly haven't looked too deeply into the MediaWiki code.

-- 
Henry



More information about the MediaWiki-l mailing list