Page MenuHomePhabricator

Allow setting of image dimensions by height only
Closed, DeclinedPublic

Description

[[Image:Foo.png|30px]] sets fixed width and height in ratio
[[Image:Foo.png|30x50px]] sets a box to fit in

could something like
[[Image:Foo.png|x30px]] set fixed height and width in ratio?


Version: unspecified
Severity: enhancement

Details

Reference
bz7049

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:24 PM
bzimport set Reference to bz7049.
bzimport added a subscriber: Unknown Object (MLST).

dunc_harris wrote:

Why can't you just calculate the corresponding required width from the height/width ratio?

ayg wrote:

Aspect ratio may change, and is different for every image. It's probably better to have this in a relatively simple and consistent fashion.

Note that it's possible to do this with

[[Image:Foo.png|3000000x30px]]

but that's rather unintuitive and hackish. A better syntax might be:

[[Image:Foo.png|30px high]]

Use the box if required. In general you wouldn't want a 300000 pixel wide image anyway, you would want to set a reasonable box size.