Module:Sandbox/Imagesize/doc
Appearance
![]() | This is a documentation subpage for Module:Sandbox/Imagesize. It may contain usage information, categories and other content that is not part of the original module page. |
This module is adapted from the 'getdimensions' function in Module:Multiple image for use as a stand-alone.
It has three functions: getWidth, getHeight, getDimensions. They take a filename, with or without the "File:" prefix, and return the width, or the height, or both dimensions (WIDTHxHEIGHT), respectively. It works with files on Commons or local ones, and works with animated gifs using the dimensions of the first image.
Examples
{{#invoke:Sandbox/Imagesize|getDimensions|Example.jpg}}
→ 300x300{{#invoke:Sandbox/Imagesize|getWidth|Example.jpg}}
→ 300{{#invoke:Sandbox/Imagesize|getHeight|Example.jpg}}
→ 300{{#invoke:Sandbox/Imagesize|getDimensions|File:Bishzilla Lucia Looking Right.gif}}
→ 100x103