Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way automatically to resize MediaWiki images depending on screen size?

MediaWiki pictures can be set to a certain size with simple formatting.

However, tables will resize on the fly depending on the browser / screen size.

Can images be made to resize like tables?

(Images inside tables does not work!)

like image 274
Reinstate Monica - Goodbye SE Avatar asked Jan 31 '12 10:01

Reinstate Monica - Goodbye SE


People also ask

How do I resize an image automatically?

The max-height property sets the maximum height of an element, and the max-width property sets the maximum width of an element. To resize an image proportionally, set either the height or width to "100%", but not both. If you set both to "100%", the image will be stretched.

How do you proportionally resize an image?

If the Shift key is held down whilst moving the handle, then the proportions of the object will be preserved. For example, if I hold Shift and drag the bottom edge upwards to reduce the size by half, then the right edge will automatically move to the left to reduce the width of the object by the same amount.

Which method will preserve aspect ratio when you resize a picture?

Press-and-hold the Shift key, grab a corner point, and drag inward to resize the selection area. Because you're holding the Shift key as you scale, the aspect ratio (the same ratio as your original photo) remains exactly the same.


1 Answers

I had the same question and saw from the answers above (now they are below) that you cannot have several pics with different relative sizes. So I wrote a mediawiki extension allowing this: http://mediawiki.org/wiki/Extension:AdaptiveThumb

like image 140
Thorsten Staerk Avatar answered Oct 15 '22 13:10

Thorsten Staerk