Page MenuHomePhabricator

Thumbnails limited by their height (and not width)
Closed, DeclinedPublic

Description

Author: hugo.lpz

Description:
Some cases need a function to put the heigh of a serie of pics.

  • See

http://commons.wikimedia.org/wiki/Category:CJK_stroke_order/Billion#Chinese_characters
this case need every pic with the same height.

I propose a convention such :
[[Image:男-bw.png|130px]] => 130px => width="130px"
[[Image:男-bw.png|px130]] => px130 => height="130px

this may be easely added to mediawiki.


Version: unspecified
Severity: enhancement

Details

Reference
bz7874

Event Timeline

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

robchur wrote:

You can request than an image be rendered to fit into, e.g. a 200x200 pixel
square using the following:

[[Image:Larousse.jpg|200x200px|left]] etc.

hugo.lpz wrote:

This way <b>doesn't work</b> for series of pics which need to show the same
height, but a variable width.

Some series need to put a definited height, but a free width. A new syntaxe such
as :
[[Image:男-bw.png|px130]] => px130 => height="130px" ; width="free"
is what such case need.

robchur wrote:

The thumbnail should be scaled such that the requisite box size is used,
maintaining the aspect ratio. You can also use a gallery if you need to display
multiple images.

ayg wrote:

"px130" seems pretty counterintuitive to me. "130high" looks silly but at least
is understandable. Any other suggestions?

robchur wrote:

Simetrical, we already have syntax which does this.

ayg wrote:

Which is what? I guess you could say [[Image:男-bw.png|1000000x130px]],
actually, but that's kind of hackish.

hugo.lpz wrote:

With a serie of test (see link), I seen no syntaxe working fine. No syntaxe
fix/lock the height, and the width free.

What is the syntaxe for which both [[Image:贵-bw.png|yoursyntaxe]] and [[Image:
十-bw.png|yoursyntaxe]] will show the same height ?

ayg wrote:

[[Image:贵-bw.png|1000000x20px]] [[Image:十-bw.png|1000000x20px]]

Just it's hackish and a cleaner syntax would be nice.

hugo.lpz wrote:

1000000x20px work fine ( http://commons.wikimedia.org/wiki/Template_talk:Radical
see in the end). Many thanks Simetrical !

I also think that a more convenient syntax is need. I proposed

  • [[Image:男-bw.png|130px]] => 130px => width="130px"
  • [[Image:男-bw.png|px130]] => px130 => height="130px

because it's ...symetrical. px130, for the height, being the exact opposite of
130px, for the width.
That a proposition.