This Forum has been archived

Visit the new Forums
Forums: Index Support Requests Setting image height instead of width
FANDOM's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

50px-Replacement filing cabinet.svg

Note: This topic has been unedited for 2762 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

Hi all, I am wondering if there is a way to set an images height instead of the width of the picture. Becuase it is really frustrating to change all the widths if you want to have a max-height on multiple pics.

For example I want [[File:Blazing Pedestal.png|link=Blazing Dragon|57px]] where 57px is the width, the 57px to be the height.


Use x57px. This notation stems from 12x57px, where 12 would be the width and 57 the height.--PedroM (talk) 13:50, September 2, 2012 (UTC)

Yes, from mw:Help:Images:

  • {width}px — Resizes the image to fit within the given maximum width in pixels, without restricting its height;
  • x{height}px — Resizes the image to fit within the given maximum height in pixels, without restricting its width;
  • {width}x{height}px — Resizes the image to fit within the given width and height in pixels;
  • upright — Resizes an image to fit within reasonable dimensions, according to user preferences (suitable for images whose height is larger than width).
Note that the image will always retain its aspect ratio, and can only be reduced (not increased) in size unless it's in a scalable media type (bitmap images cannot be scaled up).
The default maximum size depends on the format and the internal image dimensions (according to its media type). leviathan_89 13:54, 2 September, 2012 (UTC)
Wow that is awesome, thank you very much :D Essiw
Community content is available under CC-BY-SA unless otherwise noted.