Requests for comment/Square bounding boxes

The current mediawiki syntax for image thumbnails and resizing works poorly for images which are taller than they are wide. The  option attempts to remedy this, but properly scaling an thumbnail to fit a square bounding box requires the user to manually compute the aspect ratio of the image. There is no way to directly limit or scale a thumbnail based on height.

Proposals
There are two proposals for remedying this situation:
 * 1) Change mediawiki to use square bounding boxes by default (opt-out).
 * 2) Add a new image option to request a square bounding box (opt-in).

Square bounding boxes by default
In this version of the proposal, the existing width-only restrictions on image size would be the exception, not the rule. Assuming a 220px default thumbnail size: 200px             (scales to 200 x 200 bounding box) thumb             (scales to 220 x 220 bounding box) thumb|upright=0.5 (scales to 110 x 110 bounding box) x200px            legacy syntax, restricts height only 150x200px         legacy syntax, uses specified non-square bounding box 200xpx            new syntax, restricts width only? no way to have a thumbnail scaled by default width only

New "square" option
In this version of the proposal, a new "square" image option opts-in to square bounding boxes. Again assuming a 220px default thumbnail size: (resizes to 200x200px) (resizes to 200x200px) (resizes to 200x200px, using max dimension) (resizes to 220x220px) (resizes to 110x110px)

Implementation
The "square" image option is implemented by https://gerrit.wikimedia.org/r/120856