Extension:ImageSizeInfoFunctions

Introduction
ImageSizeInfoFunctions is an extension to MediaWiki that gives two parser functions returning width and height size of a given image, available in the wiki.

Its purpose is to make it easier to create a template for resizing an image in percentage instead of absolute size. This is useful for images gallery based on images of the same scale but different size.

Features

 * imageWidth (imgw) returns the image width in pixel.
 * imageHeight (imgh) returns the image height in pixel.

Installation

 * 1) Download ImageSizeInfoFunctions.php
 * 2) Download ImageSizeInfoFunctions.i18n.php
 * 3) Save both files in the new extensions/ImageSizeInfoFunctions directory of your wiki.
 * 4) Insert these lines in the LocalSettings.php file:

Configuration
no configuration required

Usage
As for all parser functions:

Template Example
This template is useful for scaling the given image by percentage or, as usual, by absolute size:



Thus, assuming that the template is called ScaleImage:

Scaling the image to 15%:

Scaling the image to 80 pixel:

Version history

 * 0.0.1 - testing
 * 1.0.0 - first stable release
 * 1.0.1 - improvement suggested by G.Hagedorn in discussion page

Feedback
Use the discussion page for feedback, questions, feature requests and bug reports.

Sites using this extension

 * wiki dedicated to DSA role playing game