Module:ImageRatio/doc: Difference between revisions
Appearance
Content deleted Content added
Adam Cuerden (talk | contribs) ←Created page with '{{Module rating| release}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> == Usage == <code><nowiki>{{</nowiki>#invoke:{{subst:BASEPAGENAME}}|ratio|Filename.jpg<nowiki>}}</nowiki></code> 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. <includeonly>{{Sandbox other|| <!-- Categories belo...' |
(No difference)
|
Revision as of 10:26, 31 January 2024
Usage
{{#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.