Last modified: 2012-12-31 14:16:02 UTC
It is common to use the multiple image template (http://en.wikipedia.org/wiki/Template:Multiple_image) to post post a row of thumbnails specified to be the same height. The template needs to know the width of each thumbnail in order to draw a box around them. It has no way to obtain the dimensions or aspect ratio of the original images. Therefore the template does not accept height as a parameter. In order to obtain the desired result, one must manually enter the dimensions of each image and desired height into a formula that returns the width. Example: Instead of entering simply this: height = 100 One must enter this: width1 = {{#expr: (100 * 750 / 536) round 0}} width2 = {{#expr: (100 * 320 / 438) round 0}} width3 = {{#expr: (100 * 892 / 723) round 0}} etc. This is hackish and cumbersome and can mess up formatting if an image is updated with a different aspect ratio. If there was a way to obtain the dimensions or aspect ratio of an image then the template could handle this.
This template seems to be trying to reproduce the <gallery> tag hook. Does it have specific features that are useful etc, or should it simply be replaced with use of <gallery>? What exactly does it need to know image width/height for to draw boxes? Shouldn't it leave boxes to the style sheets or MediaWiki's own image box rendering?
As an aside, there are several extensions that do this - [[mw:Extension:MediaFunctions]], among others.
Brion Vibber: This template formats the images in a much more aesthetically pleasing and efficient way. Bawolff: This looks like just what I'm looking for. How might I ask for this to be included in a main release of MediaWiki or installed on Wikimedia so it can be used in the multiple image template on Wikipedia?
> Bawolff: This looks like just what I'm looking for. How might I ask for this > to be included in a main release of MediaWiki or installed on Wikimedia so it > can be used in the multiple image template on Wikipedia? Generally you need to get community consensus and then convince a senior dev to review it (generally takes a long time, especially if the use-cases for it aren't particularly strong. There's a long list of extensions waiting review at [[mw:Review_queue#Extensions]] )