Page MenuHomePhabricator

FY 25/26 WE 5.4.7 Standardize thumbnail sizes
Closed, ResolvedPublic

Description

Historically, we've allowed clients to request image thumbnails of arbitrary size and relied on live-rendering those and then storing them in a cache.

This is not really sustainable long term, and we want, in the context of responsible use of our resources, to limit the ability of clients to generate arbitrary thumbnails sizes.

To this end, we want to do the following:

  • Compile a complete list of all the "canonical" thumbnail sizes, including the ones we show on the commons file pages, the ones we pre-generate, and the ones used on-wiki (T408715)
  • Measure the frequency of use of thumbnail sizes, including canonical and popular non-canonical ones (T410304)
  • Drop seldomly used sizes from this list; also rationalize the pre-generation list (T412971)
  • Start rate-limiting generation of thumbnails at sizes different from the canonical ones. (cf. T402792 )
  • [Stretch] Block non-standard sized requests from untrusted, suspect-bot traffic

Follow-up work on moving to only serve standard-size thumbnails is going to be done under WE 5.4.10 - T414805

Event Timeline

Joe triaged this task as High priority.Oct 23 2025, 5:55 AM

We are now rate-limiting non thumbnail steps requests for cache misses when certain X-Is-Browser thresholds are met

Change #1224051 had a related patch set uploaded (by MVernon; author: MVernon):

[operations/mediawiki-config@master] Update config to reflect new standard set of thumbnail sizes (WE 5.4.7)

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

Change #1224071 had a related patch set uploaded (by MVernon; author: MVernon):

[operations/mediawiki-config@master] Stop pregenerating thumbnails

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

Change #1224051 merged by jenkins-bot:

[operations/mediawiki-config@master] Update config to reflect new standard set of thumbnail sizes (WE 5.4.7)

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

Mentioned in SAL (#wikimedia-operations) [2026-01-07T13:30:18Z] <ladsgroup@deploy2002> Started scap sync-world: Backport for [[gerrit:1224051|Update config to reflect new standard set of thumbnail sizes (WE 5.4.7) (T408062 T412971)]]

Mentioned in SAL (#wikimedia-operations) [2026-01-07T13:32:30Z] <ladsgroup@deploy2002> mvernon, ladsgroup: Backport for [[gerrit:1224051|Update config to reflect new standard set of thumbnail sizes (WE 5.4.7) (T408062 T412971)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-01-07T13:37:20Z] <ladsgroup@deploy2002> Finished scap sync-world: Backport for [[gerrit:1224051|Update config to reflect new standard set of thumbnail sizes (WE 5.4.7) (T408062 T412971)]] (duration: 07m 02s)

Change #1224071 merged by jenkins-bot:

[operations/mediawiki-config@master] Only generate 120,250 thumbs (temporary)

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

Mentioned in SAL (#wikimedia-operations) [2026-01-08T17:32:59Z] <ladsgroup@deploy2002> Started scap sync-world: Backport for [[gerrit:1224071|Only generate 120,250 thumbs (temporary) (T408062 T412971)]]

Mentioned in SAL (#wikimedia-operations) [2026-01-08T17:35:41Z] <ladsgroup@deploy2002> mvernon, ladsgroup: Backport for [[gerrit:1224071|Only generate 120,250 thumbs (temporary) (T408062 T412971)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-01-08T17:50:32Z] <ladsgroup@deploy2002> Finished scap sync-world: Backport for [[gerrit:1224071|Only generate 120,250 thumbs (temporary) (T408062 T412971)]] (duration: 17m 34s)

MatthewVernon updated the task description. (Show Details)

There is probably further documentation improvement; the former I've updated with the new set of standard sizes, the latter (whilst it needs a tidy) does at least have the standard sizes in an info box at the tip of the page.

Change #1237279 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[operations/mediawiki-config@master] Stop pre-gen jobs altogether

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

Change #1237279 merged by jenkins-bot:

[operations/mediawiki-config@master] Stop thumbnail pre-gen jobs altogether

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

Mentioned in SAL (#wikimedia-operations) [2026-02-05T20:12:48Z] <ladsgroup@deploy2002> Started scap sync-world: Backport for [[gerrit:1237279|Stop thumbnail pre-gen jobs altogether (T408062)]]

Mentioned in SAL (#wikimedia-operations) [2026-02-05T20:14:43Z] <ladsgroup@deploy2002> ladsgroup: Backport for [[gerrit:1237279|Stop thumbnail pre-gen jobs altogether (T408062)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-02-05T20:19:17Z] <ladsgroup@deploy2002> Finished scap sync-world: Backport for [[gerrit:1237279|Stop thumbnail pre-gen jobs altogether (T408062)]] (duration: 06m 29s)