Page MenuHomePhabricator

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


[From editor submission.]

Images which have no size specified default to width=200 even when they're smaller than this; see for example where the first image (with no size specified) becomes:

<img height="" width="200px" src=";width=200" alt="Stub icon 1">

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

<img height="" width="35" src=";width=35" alt="Stub icon 2">

Version: unspecified
Severity: minor



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:01 AM
bzimport added a project: Parsoid.
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.Feb 11 2015, 5:16 PM

I think the bug description has probably gotten a little bit scrambled over time. 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.