Page MenuHomePhabricator

[FYI] Default thumbnail size preference for article content is now limited to three sizes
Open, Needs TriagePublic

Assigned To
None
Authored By
Jdlrobson-WMF
Wed, Apr 29, 11:14 PM
Referenced Files
F80329552: screenshot-4.jpg
Fri, May 8, 5:42 PM
F80329540: screenshot-3.jpg
Fri, May 8, 5:42 PM
F80327742: screenshot-2.jpg
Fri, May 8, 5:35 PM
F80327718: screenshot-1.jpg
Fri, May 8, 5:35 PM

Description

NOTE: Due to a caching problem it is possible your thumbnail size isn't being respected at all. Please reassured, providing you are using a modern browser, this is not expected, not the outcome described in this tech news notice and will be addressed soon.

Background

This change only impacts logged in users who have selected a thumbnail preference other than 250px in user preferences.

Historically, MediaWiki has allowed users to choose between a variety of thumbnail sizes.
On most wikis the options have been: [ 120, 150, 180, 200, 220, 250, 300, 400 ] with the exception of sv.wikipedia.org which used [ 120, 200, 250, 300, 360 ] and Italian Wikiquote which also supports the additional 360px option.

Why

In an effort to manage the excessive demands spidering has placed on our thumbnail service, we've been making changes to how we serve thumbnails and improving performance for logged in users Each of these thumbnail options requires us to store an additional variant of the article (in parser cache) and means your page is more likely to load slower (given the cache has fewer users). We have recently improved this preference so that it doesn't rely on cache. Part of those efforts involved not splitting the cache on thumbnail size and instead serving the same HTML to all users and managing thumbnail size preferences on the client side.

We will be reducing available options to three T417513: Switch to CSS/JS solution for thumbnail size in legacy parser.

The three options going forward will be:

  • Small - 180px
  • Regular - 250px
  • Large - 400px

During the switchover period, your preferences dropdown will initially look the same

  • If you chose a thumbnail size under 250px you will be given Small
  • If you chose a thumbnail size is 250px you will be given Regular
  • If you chose a thumbnail size is greater than 250px you will be given Large

These options have been carefully selected reviewing historic values and usage patterns in T376152: Evaluate feasibility of deprecating (or limiting) user media size preferences.

How am I impacted

As part of these changes, next week you will notice the following changes:

If you have selected one of the following options, thumbnails will now render at 180px:
120px, 150px, 200px, 220px

If you have selected one of the following options, thumbnails will now render at 400px:
300px, 360px

Next steps

We will be updating Special:Preferences to reflect three options to reduce any confusion that may arise from having different thumbnail sizes from the ones you have chosen explicitly. This work is being done in {TBC}.

How do I opt out?

If this is a problem for you, you can adjust your preferred thumbnail size with CSS (at your own risk) using Special:MyPage/common.css.

If you want to revert back to a 120px thumbnail, make sure your image thumbnail preference is set to 250px and add the following CSS:

.mw-parser-output .mw-default-size img.mw-file-upright,
 .mw-parser-output .mw-default-size img[width="250"] {
    width: calc(120px * var(--mw-file-upright, 1));
}

Event Timeline

Jdlrobson-WMF renamed this task from Thumbnail preference is now limited to three sizes to [FYI] Thumbnail preference is now limited to three sizes.Thu, Apr 30, 12:59 AM
Jdlrobson-WMF updated the task description. (Show Details)

Please also update https://www.mediawiki.org/wiki/Common_thumbnail_sizes alongside.

CN admins have already noticed a few errors in CentralNotice banners that use thumbnails to save bandwith and have fixed the running and upcoming campaigns.

CN admins have already noticed a few errors in CentralNotice banners that use thumbnails to save bandwith and have fixed the running and upcoming campaigns.

CN banners are not impacted by this change. This is likely something else. Could you point me to where this is being discussed? Thanks in advance!

Jdlrobson-WMF renamed this task from [FYI] Thumbnail preference is now limited to three sizes to [FYI] Default thumbnail size preference for article content is now limited to three sizes.Tue, May 5, 3:26 PM

I can share the email that I have sent to fellow CN admins:

Hi, dear fellow CN admins, as I've just learned now, the WMF limits thumbnail sizes in order to avoid data space. Only a limited number of pixel types are available, see https://www.mediawiki.org/wiki/Common_thumbnail_sizes . That means that lots of the thumbnail sizes we have used in the designs for the banners (because loading full-size images with every banner display causes too much traffic for viewers of the banners) will create errors like this:

https://de.wikipedia.org/wiki/Wikipedia:Hauptseite?banner=jugend_editiert_var_thumbnail_error
->
https://upload.wikimedia.org/wikipedia/commons/thumb/c/ce/Puzzle_black-white_missing.jpg/320px-Puzzle_black-white_missing.jpg
“Use thumbnail steps listed on https://w.wiki/GHai. Please contact noc@wikimedia.org for further information (a765913)”

This has an impact on cloning previous banners as well as running or future banners (I will check these after having finished this email). Please use the banner preview in case you see a thumbnail error!

Before these my fixes, the thumbnails in the banners were not shown (check my example above):

Before these my fixes, the thumbnails in the banners were not shown (check my example above):

The change relating to this user notice hasn't been deployed yet. What you are referencing seems related to the wikitech-l https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/message/LS2NVZTBZPQDK2W7IP66SHUXP2J54435/ thread.

My thumbnail preference is no longer being respected. For years, I've had it at 400px, but all images are showing as 250px. I think the change happened in the last 24 hours but I could be wrong.

My thumbnail preference is no longer being respected. For years, I've had it at 400px, but all images are showing as 250px. I think the change happened in the last 24 hours but I could be wrong.

This shouldn't be happening... Could you share some additional information?

  1. What browser are you using (and importantly what version)?
  2. Is this a phone or a desktop/laptop computer?
  3. Can you confirm https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering-files shows 400px in the dropdown?
  4. Confirm https://en.wikipedia.org/wiki/User:Jdlrobson/T51501 is rendering at 250px for you
  5. Could you download another browser, login and view https://en.wikipedia.org/wiki/User:Jdlrobson/T51501 in it and tell me if the image appears the correct size

Thanks in advance!

This shouldn't be happening... Could you share some additional information?

Using Chrome 147.0.7727.138 on a Windows 11 PC (25H2). 400px is selected in the dropdown. Some pages show the correct size on enwiki (e.g. Crab Rave, User:Jdlrobson/T51501), but some others show 250px-fixed images (e.g. Ejae, freeImages). The same inconsistency is occurring on my Mac, too (also Chrome browser).

Thanks. I can replicate this and it's not supposed to work this way. There appears to be some kind of caching issue on certain pages. Can you confirm the images render correctly at this URL (https://en.wikipedia.org/wiki/Ejae?debug=true) with cache disabled?

I will look at it tomorrow but I expect it will fix itself with tomorrow's deployment.

Yep, that link works correctly!

@SWinxy sorry about this. I see what happened here - our cache is not being flushed correctly. We'll get it fixed tomorrow. Assure you this is only temporary and thanks for reporting it today so I have a chance to fix it tomorrow before the weekend deployment freeze!

Can confirm this is fixed! Thank you! Are images smaller than 400px meant to be expanded to the thumbnail size? e.g. FreeImages has three PNGs whose sizes are increased to 400px, but I can't recall if this was previously the behavior.

Can confirm this is fixed! Thank you!

Thank you for confirming!

Are images smaller than 400px meant to be expanded to the thumbnail size? e.g. FreeImages has three PNGs whose sizes are increased to 400px, but I can't recall if this was previously the behavior.

This is tracked in T421524: Images with an original size less than 400px are scaled up by large thumbnail preference. This is new behaviour. A previous attempt to fix this had downsides, so we were trying to decide if this is a problem and would appreciate any feedback you have on that ticket

@Jdlrobson-WMF: something has changed again. All thumbnails have recently become 30% smaller. I also noticed that choosing the image size of 220px or lower in user preferences results in the same image size of 150px. On the other hand, image sizes of 250px and 300px work as expected.

Could you take a look please?

Wiki in question: ru.wikivoyage.org

@Atsirlin thanks for report. To help me understand what's happening I need some more informaton:

  • Could you share page(s) (and ideally a screenshot) of pages you consider not working correctly
  • Share what thumbmail size you have selected in user preferences
  • let me know your browser and its version.

@Jdlrobson-WMF, thank you for bringing me into this thread!

Here is one issue I have. I look at the page https://ru.wikivoyage.org/wiki/Мельк, either being logged in (Firefox 150.0.2, 250px image width set in preferences) or not logged in (Chrome 147.0.7727.138 with, presumably, the same default image size of 250 px). However the image size differs by more than 10%, as one can see in the attached screenshots.

screenshot-1.jpg (746×1 px, 163 KB)

screenshot-2.jpg (743×1 px, 131 KB)

My other issue is that the opt-out solution works for vertical images but not for the horizontal ones. I attach two screenshots produced after setting either 150px and 220px in my common.css. The vertical image changes, the horizontal one does not. Another difference between the two images is that the vertical one uses upright=1, whereas the horizontal one uses upright=1.35.

screenshot-3.jpg (743×1 px, 139 KB)

screenshot-4.jpg (742×1 px, 139 KB)

It is the same page as above and Firefox 150.0.2

The thumbnail for Stiftspark_Melk_Raben_2.jpg is rendering at 340px to me (consistent with wayback machine version in December 2025). The image has upright 1.35 and 250 * 1.35 = 337.5px. ( and wee are rounding up to the nearest 10px) so it should render at 340px. I see you have 110% zoom on the browser. Are you sure that's not the problem?

I see no difference between this week and last week. What width is it rendering for you?

My other issue is that the opt-out solution works for vertical images but not for the horizontal ones

I've updated the description to account for this. Thanks for flagging. Let me know if it doesn't work.

Thanks for fixing the second issue! It works as expected now.

And the first issue is indeed due to zoom. Bringing the zoom level to 100% makes the image right and the font size too small, but that's another story.