Jump to content

Module:ImageRatio/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
 
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.