Page MenuHomePhabricator

Switch to CSS/JS solution for thumbnail size in legacy parser
Closed, ResolvedPublic

Description

Parsoid is moving to a CSS/JS solution for thumbnail size (T375981); we probably want to use the same solution for the legacy parser as well to reduce the variance between legacy and Parsoid output.

TODO

Rollback plan

While this has been in Parsoid for some time, this will expand the feature to a much larger audience. Differences in rendering may be noticed by eagle-eyed users. It is important that we do not rollback if the complaints are about minor changes (e.g. an image is more pixelated than before or the image is 20px smaller than before)

We should only consider rollback in the following situations:

  • Images are appearing as a completely different size for logged out users
  • Logged in users are seeing images in sizes different to the wikitext e.g. [[File:Foo.jpg|600px]] is not rendering at 600px.

If we do need to rollback, logged in users will need to purge the page and cache to revert to previous rendering.

Event Timeline

Change #1255907 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] Legacy parser uses CSS to scale thumbnails

https://gerrit.wikimedia.org/r/1255907

Change #1269534 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] CSS thumbnail scaling: round 'upright' size to nearest 10px

https://gerrit.wikimedia.org/r/1269534

Change #1255907 merged by jenkins-bot:

[mediawiki/core@master] Add upright CSS variable to legacy parser

https://gerrit.wikimedia.org/r/1255907

Change #1269534 merged by jenkins-bot:

[mediawiki/core@master] CSS thumbnail scaling: round 'upright' size to nearest 10px

https://gerrit.wikimedia.org/r/1269534

Change #1269671 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] Legacy parser no longer varies by thumbnail size.

https://gerrit.wikimedia.org/r/1269671

Change #1269671 merged by jenkins-bot:

[mediawiki/core@master] Legacy parser no longer varies by user thumbnail size.

https://gerrit.wikimedia.org/r/1269671

Jdlrobson-WMF updated the task description. (Show Details)

Change #1283056 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@wmf/1.46.0-wmf.26] Legacy parser no longer varies by user thumbnail size.

https://gerrit.wikimedia.org/r/1283056

Change #1283056 merged by jenkins-bot:

[mediawiki/core@wmf/1.46.0-wmf.26] Legacy parser no longer varies by user thumbnail size.

https://gerrit.wikimedia.org/r/1283056

Mentioned in SAL (#wikimedia-operations) [2026-05-05T21:16:13Z] Started scap sync-world: Backport for [[gerrit:1281501|Email confirmation banner: Remove obsolete arm_b variant (T421366)]], [[gerrit:1283056|Legacy parser no longer varies by user thumbnail size. (T417513)]]

Mentioned in SAL (#wikimedia-operations) [2026-05-05T21:33:52Z] jdlrobson, mmartorana, arlolra: Backport for [[gerrit:1281501|Email confirmation banner: Remove obsolete arm_b variant (T421366)]], [[gerrit:1283056|Legacy parser no longer varies by user thumbnail size. (T417513)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-05-05T21:49:08Z] Finished scap sync-world: Backport for [[gerrit:1281501|Email confirmation banner: Remove obsolete arm_b variant (T421366)]], [[gerrit:1283056|Legacy parser no longer varies by user thumbnail size. (T417513)]] (duration: 32m 55s)