Jump to content

Module:ImageRatio/doc

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Warudo (talk | contribs) at 21:49, 29 August 2024 (Added the page to Category:Module documentation pages). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)


Usage

[edit]

{{#invoke:ImageRatio|ratio|Filename.jpg}}

This returns the ratio of width to height (w/h) for an image. Defaults to returning 1 if the image doesn't exist, this avoids divide by 0 errors in templates that use it.