Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Unofficial Rhythm Doctor Custom Level Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module talk:InfoboxImage
(section)
Add topic
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
Add topic
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Default maxsize to 250px == I’ve recently been coming across a lot of Infoboxes with substatially large images in their infoboxes. 300-400px in size. Can we modify this module to default to a {{code|maxsize}} of 250px? If for some reason a particular infobox wants to override that, that’s another matter, but that way we can at least cut down on the number of large images? If there is no objection to this change, I’m happy to write the code in the sandbox and do a formal edit request. '''[[User:Zackmann08|<span style="color:#00ced1">Zack</span><span style="color:#007F94">mann</span>]]''' (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 07:37, 30 September 2025 (UTC) :A few comments: :#I would be extremely cautious about setting defaults in this template. It's used on 5M pages and in system messages. The probability of unintended consequences is high. :#Looking at [https://en.wikipedia.org/w/index.php?title=Special:Search&limit=500&offset=0&ns10=1&search=insource%3AInfoboxImage+insource%3Asizedefault the usage of {{para|sizedefault}}], I see many templates use {{para|sizedefault|frameless}}. With the current code, such a default will ignore maxsize. :#Looking at [https://en.wikipedia.org/w/index.php?title=Special:Search&limit=500&offset=0&ns10=1&search=insource%3AInfoboxImage+insource%3Amaxsize the usage of {{para|maxsize}}], many templates set maxsize larger than 250px. The largest ones appear to be 325px. To be conservative, the default maxsize should set to a high value (e.g., 325px). I think, however, it would be safer not to have a default maxsize. :— [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 10:11, 30 September 2025 (UTC) ::We should not standardize on a pixel size, per [[MOS:IMGSIZE]] ({{tq|Except with very good reason, a fixed width in pixels (e.g. 17px) should not be specified, because it ignores the user's base width setting.}}). See [[Module_talk:InfoboxImage#Help_with_improving_default_image_sizes|the discussion above]], which proposes to somehow default to the viewer's preferred thumbnail size, and [[Template_talk:Infobox_bridge/Archive_2#Image_and_map_widths|the 2022 discussion that led to the one above]]. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 10:44, 30 September 2025 (UTC) :::Per {{diff|title=Module:InfoboxImage|diff=prev|oldid=1306324007|label=this recent edit}}, setting {{para|maxsize}} does not standardize on a pixel size. If we do set {{para|maxsize|250}}, then it limits {{para|size}} to 250 and limits {{para|upright}} to 1.136. px is not forced or favored in any way. :::Also -- I just cleaned up <s>all</s> uses of {{para|sizedefault|frameless}}, so that is no longer a factor in any decision. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 13:52, 30 September 2025 (UTC) ::::Thanks for both of those. Based on the above discussion, which I had forgotten about because I got so mixed up, it looks like the sizedefault of frameless will override the maxsize as long as size= is not specified. I tested <code>sizedefault=frameless|maxsize=250</code> in my sandbox and got a 300px image, which is the same as my thumbnail preference. If I set <code>sizedefault=frameless|maxsize=250|size=100</code>, I get a 100px image. Based on that, it looks like a <s>sizedefault</s> <ins>maxsize</ins> of 250px would prevent images from getting larger than the editor's preferred thumb size unless size= is specifically set. Caveat: I might not be testing all possible cases. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 14:12, 30 September 2025 (UTC) :::::To clarify: the behavior with {{para|sizedefault|frameless}} is a bug. Maybe I should fix the bug rather than cleaning up occurrences of {{para|sizedefault|frameless}}, although fixing the bug would add 3 lines of special-purpose code for that case. :::::To see the correct behavior, if you try <code>maxsize=250</code> you should get 250px, if you try <code>upright=1|maxsize=250</code> you should get 300px, while if you try <code>upright=1.5|maxsize=250</code> you should get 340px (limited by maxsize). — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 14:44, 30 September 2025 (UTC) ::::::Yeah, now I'm confused again. ::::::*When I set <code>maxsize=250</code>, I get 250px (my thumb size is 300px, and I thought sizedefault=frameless was being set by default, so I was expecting 300px). ::::::*When I set <code>|upright=1|maxsize=200</code>, I get 270px (about 137% of maxsize, so it doesn't match maxsize or the upright setting). ::::::*When I set <code>|upright=1|maxsize=250</code>, I get 300px (my thumb size preference; this seems correct). ::::::*When I set <code>|upright=1|maxsize=300</code>, I get 300px (my thumb size preference; this seems correct). ::::::*When I set <code>|upright=1.5|maxsize=300</code>, I get 412px (about 137% of maxsize and my thumb size, so it doesn't match maxsize or the upright setting). ::::::The code I am using in a Preview window in my sandbox looks like <syntaxhighlight inline lang=wikitext>{{subst:#invoke:InfoboxImage|InfoboxImage|image=Mustela erminea upright.jpg |upright=1|maxsize=300}}</syntaxhighlight>. Somebody please explain it to me like I'm not very smart. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 16:22, 30 September 2025 (UTC) :::::::The maxsize parameter is to limit the value of the size parameter. Normally in an infobox template you would have <syntaxhighlight inline lang=wikitext>image = {{subst:#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size}}}|maxsize=300}}</syntaxhighlight> and then when used on an article with <syntaxhighlight inline lang=wikitext>{{Infobox something|image=abc.jpg|image_size=500}}</syntaxhighlight>, the image size would be limited to 300. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 18:26, 30 September 2025 (UTC) {{od|7}} To understand the behavior, see [[#Other size parameters cause upright to be ignored|the discussion above]]. The maximum size (in px) for InfoboxImage when upright is specified is (maxsize/220)*(your thumbnail preference). :When you set maxsize=200, you are saying that the max upright is 200/220 = 0.909, which is 272px. :When you set maxsize=250, you are saying that the max upright is 250/220 = 1.136, which is 341px. Upright=1 thus gives 300px for you. :When you set maxsize=300, you are saying that the max upright is 300/220 = 1.364, which is 409px for you. Upright=1 thus gives 300px, but upright=1.5 gets limited to 1.364 which is 409px. The 220 comes from the default user thumbnail size. Hope this helps. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 22:37, 30 September 2025 (UTC) :[https://en.wikipedia.org/w/index.php?title=Atuwatse_I&oldid=1305079334 Here] is an example of what a default {{code|maxsize}} would help prevent… - '''[[User:Zackmann08|<span style="color:#00ced1">Zack</span><span style="color:#007F94">mann</span>]]''' (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 01:06, 1 October 2025 (UTC) ::{{ping|Zackmann08}} sorry for the bad news, but that article uses {{tl|Infobox royalty}} that already has {{para|maxsize|300}}. Adding a default maxsize would do anything in this case. What this module produces with that input is <nowiki>[[File:Olu Atuwatse I Dom Domingos.jpg|300x|upright=1]]</nowiki>. The "300x" is a syntax error, so the Wiki image markup just displays the image at full resolution (which is 5286x4119px). ::We could attempt to harden the output of the module so that junk doesn't "leak through". This is separate from maxsize. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 02:46, 1 October 2025 (UTC) :::{{ping|Hike395}} I added the {{para|maxsize|300}} {{Diff|Template:Infobox royalty|1314363626|1313895985|here}} as a result of finding that page. But good to know that maxsize wouldn’t have prevented it. {{smiley|sad}} — '''[[User:Zackmann08|<span style="color:#00ced1">Zack</span><span style="color:#007F94">mann</span>]]''' (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 02:49, 1 October 2025 (UTC) :Continuing from [[Template talk:Infobox settlement#Max size]] :) My [[Special:Preferences#mw-prefsection-rendering-files]] says 250px, and I don't remember having changed this myself. :So the use of 220 in this module needs to be abstracted away into some sort of a variable, because it looks like this isn't making a lot of sense otherwise. --[[User:Joy|Joy]] ([[User talk:Joy|talk]]) 10:18, 17 October 2025 (UTC) ::And if [[Wikipedia:Image use policy#Displayed image size]] tells editors {{tq|Except with very good reason, do not use px [...], which forces a fixed image width measured in pixels, disregarding the user's image size preference setting.}}, then this module should also support relative sizes as well, instead of forcing this sort of pixel-based thinking from editors. --[[User:Joy|Joy]] ([[User talk:Joy|talk]]) 10:20, 17 October 2025 (UTC) :The default thumbnail size used to be 220px but changed to 250px in April 2025. See [[Wikipedia:Tech_news/Archive_13#Tech_News:_2025-16]]. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 17:59, 17 October 2025 (UTC) ===Edit request 17 October 2025=== {{FPER|answered=yes}} Please copy the [[Module:InfoboxImage/sandbox|sandbox]] to [[Module:InfoboxImage|main]]. Two changes: # (technical) --- factored out list of placeholder images and tracking categories into [[Module:InfoboxImage/data]] to neaten beginning of module # (substantive) --- per discussion above, the systemwide default thumbnail size is now 250px. Factored this value out of existing code and turned it into constant at beginning of module. This introduces two expected "errors" into the [[Module talk:InfoboxImage/testcases|test cases]]. {{pinging|WOSlinker}} who brought this up. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 02:28, 18 October 2025 (UTC) :{{done}} -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 09:46, 18 October 2025 (UTC)
Summary:
Please note that all contributions to Unofficial Rhythm Doctor Custom Level Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
My wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Module talk:InfoboxImage
(section)
Add topic