Difference between revisions of "Template:ScaleImage"
Jump to navigation
Jump to search
Line 23: | Line 23: | ||
</pre> | </pre> | ||
− | </noinclude><includeonly>[[ | + | </noinclude><includeonly>[[File:{{{imagename}}}|{{ #if:{{#pos:{{{newwidth|100}}}|px}}|{{{newwidth|100}}}| {{#expr: ({{#imgw: {{{imagename}}} }} * {{{newwidth|100}}}) / 100 round 0}}px }}|{{{alignment|}}}|{{{caption|}}}|]]</includeonly> |
− |
Latest revision as of 17:09, 31 May 2020
This template is useful for scaling the given image by percentage or, as usual, by absolute size.
E.g. Scaling the image to 15%:
{{ScaleImage |imagename=eland.png |caption=Città di Eland |newwidth=15 |alignment=center }}
E.g. Scaling the image to 80 pixel:
{{ScaleImage |imagename=eland.png |caption=Città di Eland |newwidth=80px |alignment=center }}