Module:ImageRatio/doc: Difference between revisions
Appearance
Content deleted Content added
Adam Cuerden (talk | contribs) No edit summary |
Added the page to Category:Module documentation pages |
||
Line 10: | Line 10: | ||
<!-- Categories below this line; interwikis at Wikidata --> |
<!-- Categories below this line; interwikis at Wikidata --> |
||
}}</includeonly> |
}}</includeonly><noinclude> |
||
[[Category:Module documentation pages]] |
|||
</noinclude> |
Latest revision as of 21:49, 29 August 2024
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.