Page MenuHomePhabricator

Images resize bigger than the original size
Closed, ResolvedPublic

Description

Author: borbus

Description:
I am not sure if this is actually a bug but it does produce some undesirable
results especially with templates. Anyway:
When you insert a size into an image tag like
<nowiki>[[image:eg.png|100px]]</nowiki> mediawiki used to ignore it if the image
was smaller than that size. For example if the image was, in fact, 50px,
mediawiki would just leave it at 50px. But now it will actually make it bigger.
It only makes it wider though not taller so thats why I think this is probably a
bug.

To reproduce the bug, put a tag to make an image bigger than its original size.
Or take a look at my user page on wikipedia which is where i noticed it:
http://en.wikipedia.org/wiki/User:Borb.


Version: 1.5.x
Severity: normal
URL: http://en.wikipedia.org/wiki/User:Borb

Details

Reference
bz2632

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:35 PM
bzimport set Reference to bz2632.

borbus wrote:

I have a suggested solution:
The software should calculate the correct height value based on the ratio of the
original size. I probably dont need to explain how to do this since I can do it
and all I have ever made is a blog.

Either that or just put the 1.4 behaiviour back which was to ignore the size
attribute if the original file was smaller. Why would one want to make an image
bigger than its original size, especialy considering the crapness of browser
resizing software. I think that this solution is better because I sometimes
(lazily) leave the size attribute in even though I know that the image is small
enough anyway. This is why my user page looks a little crap now. Of course, it
looked great before, lol.

The height of the new zoomed image was not computed.
Commited in cvs, thanks for the report.

  • Bug 2616 has been marked as a duplicate of this bug. ***