Page MenuHomePhabricator

non-absolute size specification for images
Closed, ResolvedPublic

Description

Author: freakofnurture

Description:
In lieu of a pixel size specified as, say, "80px", we should allow for the display size to
be specified as a percentage of the default size, e.g.: [[Image:Title.fmt|20%]] To display
it at 1/5 the default height and width.

For inline (non-floating) images, it would be even more helpful to add a mode that would
scale the image's height to be equal/proportionate to the font-size of the surrounding
text. This would be particularly handy in articles discussing runic symbols, hieroglphics,
Led Zeppelin's fourth album, the "Artist Formerly Known as Prince" symbol, and any other
symbols not found in Unicode. Something like [[Image:Title.fmt|fontsize]] to make it the
same height as the words left and right of the image.

--user:freakofnurture


Version: unspecified
Severity: normal

Details

Reference
bz8682

Event Timeline

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

General percentages are usually pretty unreliable as the file may be reuploaded
at a higher or lower resolution.

Duping to bug 7003, which has some other percentage variants.

Note that matching font size is not really possible, as only the browser knows
the font size and the scaling is done server-side. (While it might be possible
to try to match, sometimes, on browser-side the scaling will be awful.)

  • This bug has been marked as a duplicate of 7003 ***