Images which have no size specified default to width=200?
Closed, ResolvedPublic0 Story Points

Description

[From editor submission.]

Images which have no size specified default to width=200 even when they're smaller than this; see for example http://parsoid.wmflabs.org/_rt/en/Template:US-radio-bio-stub where the first image (with no size specified) becomes:

<img height="" width="200px" src="http://en.wikipedia.org/w?title=Special:FilePath/Radio_icon.png&amp;width=200" alt="Stub icon 1">

... whereas the second, with it specified as '35px', works as expected:

<img height="" width="35" src="http://en.wikipedia.org/w?title=Special:FilePath/Flag_of_the_United_States.svg&amp;width=35" alt="Stub icon 2">


Version: unspecified
Severity: minor

Details

Blocks
T56844: Image / media handling tracker bug
Security
None
Reference
bz43336
bzimport set Reference to bz43336.

So far we have no information about image sizes in Parsoid, and will need to perform API queries to retrieve this information. We will also have to retrieve the configured default thumbnail size (if available) through the MediaWiki web API.

I'm classifying this as low priority for now as our normal priority bugs concern basic editing and round-tripping.

[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]

This seems very similar to bug 50523. We set the mw-default-size class; VE should be observing this when it applies display styles. (The current default image size should probably not be hardcoded into the DOM representation.)

We have since changed the default to 220px, but still don't have access to the configured default thumb size in the wiki. We should probably expose $wgThumbLimits[ $wgDefaultUserOptions['thumbsize'] ] in the siteinfo api end point, and then use that for rendering.

cscott closed this task as "Resolved".

I think the bug description has probably gotten a little bit scrambled over time.

http://parsoid.wmflabs.org/enwiki/Template%3AUS-radio-bio-stub?oldid=488706129 renders correctly now. I think this bug has been fixed for a long time. Closing.

Opening T89262 for the siteinfo issue mentioned by gwicke above, but there are no WMF wikis (AFAIK) which have default thumbsizes != 220px, so that ought to be a low priority bug.

Add Comment