Jump to content

Module talk:InfoboxImage: Difference between revisions

From Fifth Empire Wiki
m 372 revisions imported from wikipedia:Module_talk:InfoboxImage
 
(225 intermediate revisions by 51 users not shown)
Line 1: Line 1:
{{Permanently protected}}
{{talk header}}
{{User:MiszaBot/config
{{User:MiszaBot/config
|archiveheader      = {{talkarchivenav}}
|archiveheader      = {{talkarchivenav}}
|maxarchivesize      = 75K
|maxarchivesize      = 75K
|counter            = 1
|counter            = 4
|minthreadsleft      = 3
|minthreadsleft      = 4
|minthreadstoarchive = 1
|minthreadstoarchive = 1
|algo                = old(14d)
|algo                = old(365d)
|archive            = Module talk:InfoboxImage/Archive %(counter)d
|archive            = Module talk:InfoboxImage/Archive %(counter)d
}}
}}
{{archives|search=yes}}
{{archives|search=yes}}


== "title=" parameter: relevance? ==
== Other size parameters cause upright to be ignored ==


How relevant is it to support the {{para|title}} parameter, especially next to the {{para|alt}} parameter? (i.e., the css-tiles a.k.a. mousehover-text; {{para|alt}}-value is used when missing).
With the current implementation of this module, the upright parameter is ignored if the maxsize or sizedefault parameters are defined. This appears to be because image syntax ignores upright if a size in pixels is defined. It means that if either of those parameters are used in an infobox template (see {{tl|Infobox bridge}} for example), then it's not possible to use the upright parameter at all in articles, which is not the intended behavior.


I get the 'css-title' angle, but not in [[WP:EIS]] and not in [[WP:FILE]] we have an option for that. So when adding a plain file to an article (outside of infobox), the option 'css-title' is not available.
I don't have the Lua skills to do so, but I think the module should be rewritten so that a pixel size is not passed if the upright parameter is used and the size parameter is not. [[User:Pi.1415926535|Pi.1415926535]] ([[User talk:Pi.1415926535|talk]]) 03:27, 30 May 2025 (UTC)
My question starts from {{tl|Chembox}}, which has 400+ parameters. I'd like to simplify this list, eg by removing this title parameter (pushing the alt parameter). -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 19:58, 25 May 2016 (UTC)


: There is an archived posting at [[Module talk:InfoboxImage/Archive 1#Alt text versus title text]] which discusses the differences. Also, the text assigned to the {{para|title}} parameter is placed into the normal image syntax (referred to as Caption at [[WP:EIS]]), so:
:I think there are two separate cases to consider:
: <code><nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Example.png|alt=Alt text|title=Title text}}</nowiki></code>
:# Both {{para|upright}} and either {{para|maxsize}} or {{para|sizedefault}} are specified
: will output the following (which could be placed into an article, inside or outside an infobox):
:# Both {{para|upright}} and {{para|size}} are specified
: <code><nowiki>[[File:Example.png|frameless|alt=Alt text|Title text]]</nowiki></code>.
:In the first case, I think the current module behavior is likely incorrect -- the caller specified a size via {{para|upright}} and it's being handled as if no size was specified. The second case is less clear, because conflicting sizes are being provided. I'm reluctant to change the current behavior for the second case, because there may be unintended consequences to the 5M articles that use this module.
: An example of using both fields (with "thumb" instead of "frameless") can be found at [[WP:FILE#Using files]]. -- [[User:Zyxw|Zyxw]] ([[User talk:Zyxw|talk]]) 04:03, 14 July 2016 (UTC)
:Of course, fixing the incorrect behavior also may have unintended consequences, also, so we should be careful. For example, the proposed behavior now allows people to set absurd values to {{para|upright}} and there is no check or limit.
::{{U|Zyxw}} thanks, my question solved. So in my case, parameter title is redundant to parameter caption. (btw, mistake in my OP: 'title' in InfoboxImage is not the same as css-title in a tag like <code>&lt;span title="css-title example"></code>. Glad it did not distract you). -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 05:32, 14 July 2016 (UTC)
:I've modified [[Module:InfoboxImage/sandbox|the sandbox]] to fix the first issue, and updated [[Module:InfoboxImage/testcases|the tests]] to exercise the new code. {{Pinging|WOSlinker}} to see if they have any comments on the change: other editors are also welcome to comment. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 09:17, 30 May 2025 (UTC)
::Later: I added some logic to ensure that {{para|upright}} doesn't produce an image larger than {{para|maxsize}}, assuming the default user preference. This fixes one potential issue. Updated sandbox and testcases. I'm hoping some other templateeditor or admin takes a look at the [https://en.wikipedia.org/w/index.php?title=Special%3AComparePages&page1=Module%3AInfoboxImage&page2=Module%3AInfoboxImage%2Fsandbox diff]. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 10:01, 30 May 2025 (UTC)
:::@[[User:Hike395|Hike395]]: Thanks for looking into this! Just to clarify - will this still allow an image scaled with upright to be larger than maxsize if the user preference is set to a larger-than-default value? That seems important for accessibility reasons. [[User:Pi.1415926535|Pi.1415926535]] ([[User talk:Pi.1415926535|talk]]) 16:09, 30 May 2025 (UTC)
::::Yes: if upright is specified, then maxsize will scale with the user's default image size. So if maxsize=300, and the user's preferred thumbnail size is set to 300px, then the output image will be limited to be less than 300*300/220 = 409px for that user. There's no way to avoid this. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 00:39, 31 May 2025 (UTC)
:::::Great, that is the behavior I believe it should have. [[User:Pi.1415926535|Pi.1415926535]] ([[User talk:Pi.1415926535|talk]]) 00:45, 31 May 2025 (UTC)
:To the original observation {{tq|the upright parameter is ignored if the maxsize or sizedefault parameters are defined. This appears to be because image syntax ignores upright if a size in pixels is defined}}: this is expected behaviour, and is documented at [[WP:PICSIZE]], inside the "Implementation details" box ([[WP:EIS#Implementation details|direct link]]), last paragraph. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] &#x1f339; ([[User talk:Redrose64|talk]]) 13:39, 31 May 2025 (UTC)
::{{ping|Pi.1415926535|Redrose64}} Picking this back up. My sandbox edits do not contradict [[WP:PICSIZE]]. If a absolute size and an upright are both specified, then the absolute size is used. What I did was scale maxsize and sizedefault relative to the user preferred image size. Those two parameters are only defined in this module: [[WP:PICSIZE]] does not discuss them.
::Is it ok to promote the sandbox to main? I see that since this edit, Pi.14 has removed maxsize and sizedefault from a number of infoboxes. It would be good to restore those, if I can promote sandbox to main. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 08:48, 5 August 2025 (UTC)
:::{{ping|Pi.1415926535|Redrose64}} Any comments or thoughts before I propose this as an edit? {{U|Pppery}} just [[WP:FULL|fully protected]] this Module, so I can no longer edit it, so even a simple support/agree would be helpful. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 14:46, 12 August 2025 (UTC)
:::: To be clear, my full protection was completely unrelated to this dispute, which I didn't even know existed; if you look at my edits at the time I adjusted the protection level of hundreds of templates. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 17:35, 12 August 2025 (UTC)
:::::If I'm understanding correctly what your edit does, I support it. I'm confused about your statement {{tq|Pi.14 has removed maxsize and sizedefault from a number of infoboxes}} - to my knowledge, I haven't edited any infobox templates to remove these. [[User:Pi.1415926535|Pi.1415926535]] ([[User talk:Pi.1415926535|talk]]) 05:12, 13 August 2025 (UTC)
::::::{{ping|Pppery}} apologies. I didn't mean to imply causation here -- I just wanted to point out that I can no longer edit the template directly.
::::::{{ping|Pi.1415926535}} more apologies. I recall seeing edits to infoboxes which removed maxsize and sizedefault, but now I cannot find them to check who did them. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 12:33, 13 August 2025 (UTC)
===Edit request===
{{FPER|answered=yes}}
Please copy [[Module:InfoboxImage/sandbox]] to [[Module:InfoboxImage]]


::: Glad that helped. I assume that "Caption" was used in [[WP:EIS]] because it is displayed as a caption when using "thumb". However, "title" more accurately describes it when using "frameless", because if you look at the generated HTML it is used as a title attribute in the anchor tag that surrounds the image tag: <code>&lt;a href="/wiki/File:Example.png" class="image" title="Title text"><img alt="Alt text" src= ...</code> -- [[User:Zyxw|Zyxw]] ([[User talk:Zyxw|talk]]) 06:28, 14 July 2016 (UTC)
This is a change in handling the case where {{para|upright}} and either {{para|maxsize}} or {{para|sizedefault}} is specified. In this case, the sandbox version obeys {{para|upright}}, but if it exceeds <code>maxsize/220</code>, then it is set to <code>maxsize/220</code>. The current behavior is to ignore {{para|upright}} when either {{para|maxsize}} or {{para|sizedefault}} is specified, which is incorrect.
* Sorry, this is getting into a headache.  
:First of all, [[WP:EIS]] shows [[Heart of Darkness|the horror]] of interacting parameters, thereby changing their semantics. Like this: "If the ''type'' is 'frameless', the caption value ''moves & changes'' into title (mousehover) text" (I conclude after studying the doc). No end editor should be loaded with this illogic. No software encoder should allow such change of meaning & usage.
:Next, this [[:Module:InfoboxImage]] ''adds'' to these parameter mixups by suggesting {{para|title}} replaces <nowiki>[[File:|...|Caption text]]</nowiki> (see [[Module:InfoboxImage#Parameters_displayed_in_image_syntax|this]] /doc section, first paragraph saying <code><nowiki>[[File:..|{{{TitleText}}}]]</nowiki></code> -- the position where WP:EIS says ''Caption text'' is expected). There is no gain in confusing those two concepts in this module either.
:To support my point, I quote from your [[Module_talk:InfoboxImage/Archive_1#Alt_text_versus_title_text|2014]] link by {{u|Tgr (WMF)}}: "To give a specific example, MediaViewer displays title text as the image caption; ..." (ie, another mixup variant, this time by MediaViewer). Also, you (Zyxw) wrote above: "Also, the text assigned to the |title= parameter is placed into the normal image syntax (referred to as Caption at WP:EIS)". This 'title' is named 'Caption' in WP:EIS?
:Now there is no use in explaining the 'logic' behind this once more. I'd prever we don't change parameter semantics. And this module should not deviate from <nowiki>[[File:...]]</nowiki> documentation (itself to be improved).
:As for understanding this module, I can say: '''[[:Module:InfoboxImage]] does ''not'' have the concept or option of a Caption''' (meaning: text below an image). Such text is to be entered in the {{tlf|Infobox}} template using separate {{para|caption|Caption text}}, next to (not inside) {{para|image|<nowiki>{{#invoke:InfoboxImage|...}}</nowiki>}}.
:On the other hand, if one enters {{para|image}} directly by <nowiki>[[File:..]]</nowiki>, the caption option is available in the File:-settings.
:-[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 09:32, 14 July 2016 (UTC)


== [[:Category:Pages using infoboxes with thumbnail images]] ==
This edit does not change any behavior if {{para|upright}} is not specified. Also, if {{para|size}} and {{para|upright}} are both specified, the behavior remains unchanged: {{para|size}} is obeyed in that case.
:Are you sure that this description is correct? On the testcases page, I am seeing the Mustela image with <syntaxhighlight>upright=1.5|sizedefault=272|maxsize=300</syntaxhighlight>. The live module renders the image at 1.5x my thumbnail size. The sandbox image is rendered at 272px. This seems to be the opposite of the description above, if I am reading it correctly. It also seems to be a fix that helps the module to match normal image rendering (px is preferred over upright). Is this what you want? – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 17:01, 15 August 2025 (UTC)
::You may be interpreting the unit tests backward? Here are the results when main and sandbox are called with the case that you are highlighting:
:::<code><nowiki>{{subst:#invoke:InfoboxImage|InfoboxImage|image=Mustela erminea upright.jpg |upright=1|sizedefault=272|maxsize=300}}</nowiki></code> →
[[File:Mustela erminea upright.jpg|272px|upright=1]]
:::<code><nowiki>{{subst:#invoke:InfoboxImage/sandbox|InfoboxImage|image=Mustela erminea upright.jpg |upright=1|sizedefault=272|maxsize=300}}</nowiki></code> →
[[File:Mustela erminea upright.jpg|frameless|upright=1]]
:::Here, the main module is generating a pic with size=272px, while the sandbox module is generating a pic with upright=1 (rendered at your preferred size). So the logic is correct.
:::The logic has not changed when both size and upright are specified. They are both emitted and MediaWiki prefers size over upright:
:::<code><nowiki>{{subst:#invoke:InfoboxImage|InfoboxImage|image=Mustela erminea upright.jpg |upright=1|size=200}}</nowiki></code> →
[[File:Mustela erminea upright.jpg|200px|upright=1]]
:::<code><nowiki>{{subst:#invoke:InfoboxImage/sandbox|InfoboxImage|image=Mustela erminea upright.jpg |upright=1|size=200}}</nowiki></code> →
[[File:Mustela erminea upright.jpg|200px|upright=1]]
:::— [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 17:18, 15 August 2025 (UTC)
::::Indeed, I do not understand what "Expected" and "Actual" refer to on that page. I'm used to seeing the live template followed by the sandbox, with appropriate headers to match. In that case, and based on the apparent consensus above, I have no objections. It looks like this change will require an administrator, which I am not. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 17:25, 15 August 2025 (UTC)
::::: {{ping|Redrose64}} Do you object to this request? [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 19:48, 15 August 2025 (UTC)
::::::I'm not a Lua expert, and have never claimed to be. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] &#x1f339; ([[User talk:Redrose64|talk]]) 22:18, 16 August 2025 (UTC)


Hoping to get some help. I am trying to clean out [[:Category:Pages using infoboxes with thumbnail images]]. Obviously this is a very tedious project but it is made all the more frustrating by the fact that new pages keep getting added to the category. I'm wondering, is there some way to add something to this module that will display an error in preview mode when people try to add new thumbnails? Any thoughts? --[[User:Zackmann08|<span style="color:DarkTurquoise;">Zackmann08</span>]] (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 03:15, 16 July 2016 (UTC)
{{Done}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 04:35, 17 August 2025 (UTC)
:{{ping|WOSlinker}} Any thoughts? --[[User:Zackmann08|<span style="color:DarkTurquoise;">Zackmann08</span>]] (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 00:13, 17 July 2016 (UTC)
::Probably using the REVISIONID feature similar to [[Module:Check_for_unknown_parameters]] it can be done. I'll have to see what I can do. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 08:04, 17 July 2016 (UTC)
:::{{ping|WOSlinker}} fantastic! I've not done any work with modules before, and don't have the necessary permissions to edit this page, but if I can be useful in anyway, please let me know. I do have a background in computer programming and would be happy to pair with you on making this happen. Thanks for taking some time to look into this! As a side note, as I continue to willow down this category, it would be great for it to ultimately throw an error on the actual page. Right now that doesn't make sense as there are over 3,000 pages in the category... But thought for the future. --[[User:Zackmann08|<span style="color:DarkTurquoise;">Zackmann08</span>]] (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 22:15, 17 July 2016 (UTC)
:::{{ping|WOSlinker}} I'd like to amend my request. The category is now just over 1,500. My goal is to have the category at 0 by the end of the week. What would be great is to just disallow the use of thumbs in infoboxes entirely. Either have it throw an {{tl|error}} or just remove 'thumb' and force the image to appear inline. {{ping|John of Reading}} you've been active on this project as well. Thoughts?  --[[User:Zackmann08|<span style="color:DarkTurquoise;">Zackmann08</span>]] (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 19:19, 19 July 2016 (UTC)
::::Would probably be better to replace thumb and thumbnail with frameless rather than just removing it. I've updated the code in [[Module:InfoboxImage/sandbox]]. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 20:26, 19 July 2016 (UTC)
:::::{{Re|WOSlinker}} I'm not convinced by the sandbox change. If the <code><nowiki>[[File:...|thumb|...]]</nowiki></code> includes a caption, changing from "thumb" to "frameless" makes the caption disappear, which would be confusing. It would still need a tracking category so that someone can move the caption into the proper "caption" parameter. -- [[User:John of Reading|John of Reading]] ([[User talk:John of Reading|talk]]) 21:21, 19 July 2016 (UTC)
::::::How about with the cat added back but still changing thumb to frameless ? -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 22:00, 19 July 2016 (UTC)
:::::::That would be better than the current sandbox code. However, I'd still prefer the current live code, adding the category but leaving the file specification untouched. Another confusing scenario: the caption is visible in a draft article or user subpage, but it disappears when the page is moved to mainspace. -- [[User:John of Reading|John of Reading]] ([[User talk:John of Reading|talk]]) 04:59, 20 July 2016 (UTC)
{{deindent|7}}
What about just throwing an error? Force the user to fix it themselves? --[[User:Zackmann08|<span style="color:DarkTurquoise;">Zackmann08</span>]] (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 05:30, 20 July 2016 (UTC)
:New users won't necessarily be able to fix it themselves, even if they manage to find the template documentation. -- [[User:John of Reading|John of Reading]] ([[User talk:John of Reading|talk]]) 07:15, 20 July 2016 (UTC)
::{{ping| WOSlinker|John of Reading}} You make a valid point, I'm just curious at what point do we stop holding new users hands and force them to learn? Playing devils advocate here. Is there a middle ground? The error can also link to [[WP:INFOBOXIMAGE]] which can be expanded to explain how to resolve the issue if you feel it needs to be. I've been continuing to monitor the category and I would say an average of 50 new pages fall into it each day. --[[User:Zackmann08|<span style="color:DarkTurquoise;">Zackmann08</span>]] (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 23:53, 25 July 2016 (UTC)


== Pages using deprecated image syntax ==
== Default maxsize to 250px ==


Hello all. I'm not too experienced with editing Modules but I wanted to see if there was a way to get [[:Category:Pages using deprecated image syntax]] added to this. Essentially a check for:
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)
<pre>
:A few comments:
|image = [[File:FooBar.jpg|200px]]
:#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.
</pre>
:#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.
which according to the new syntax should be:
:#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.
<pre>
:— [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 10:11, 30 September 2025 (UTC)
|image = FooBar.jpg
::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)
</pre>
:::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.
In one template ([[Template:Infobox book series]]) I saw this handled thusly:
:::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)
<pre>
::::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)
|{{#ifeq:{{str left|{{{image|}}}|1}}|[ |{{main other|[[Category:Pages using deprecated image syntax]]}} }
:::::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.
</pre>
:::::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)
Thoughts? --[[User:Zackmann08|<span style="color:DarkTurquoise;">Zackmann08</span>]] (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 16:15, 31 October 2016 (UTC)
::::::Yeah, now I'm confused again.
:{{ping|WOSlinker|John of Reading}} you were both helpful to me during a previous discussion regarding this Module. Any thoughts on this? --[[User:Zackmann08|<span style="color:DarkTurquoise;">Zackmann08</span>]] (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 18:57, 31 October 2016 (UTC)
::::::*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).  
::Are you wanting it as an option within this module or do you want it on all the time? -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 22:50, 31 October 2016 (UTC)
::::::*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).  
:::{{ping|WOSlinker}} my thought was to have it on all the time much like [[:Category:Pages using infoboxes with thumbnail images]]. Please bare in mind that I have never written a Module so I'm not 100% certain of the syntax, but I would imagine that taking lines 162-168 and making them the following would work?
::::::*When I set <code>|upright=1|maxsize=250</code>, I get 300px (my thumb size preference; this seems correct).  
<pre>
::::::*When I set <code>|upright=1|maxsize=300</code>, I get 300px (my thumb size preference; this seems correct).
if mw.ustring.sub(image,1,2) == "[[" then
::::::*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).
  -- search for thumbnail images and add to tracking cat if found
::::::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)
  if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then
:::::::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)
      return image .. "[[Category:Pages using infoboxes with thumbnail images]]";
{{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).
  else
:When you set maxsize=200, you are saying that the max upright is 200/220 = 0.909, which is 272px.
      return image .. "[[Category:Pages using deprecated image syntax]]";
: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.
  end
: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.
elseif....
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)
</pre>
:::I BELIEVE that what that will do is add any page where the image param starts with <code>[[</code> to [[:Category:Pages using deprecated image syntax]]. --[[User:Zackmann08|<span style="color:DarkTurquoise;">Zackmann08</span>]] (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 23:54, 31 October 2016 (UTC)
::::Nearly ok, but only want to add that category to mainspace articles, so need this:


<pre>
:[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)
if mw.ustring.sub(image,1,2) == "[[" then
::{{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).  
  -- search for thumbnail images and add to tracking cat if found
::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)
  if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then
:::{{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)
      return image .. "[[Category:Pages using infoboxes with thumbnail images]]";
: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.
  elseif mw.title.getCurrentTitle().namespace == 0 then
: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)
      return image .. "[[Category:Pages using deprecated image syntax]]";
::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)
  else
: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)
      return image;
===Edit request 17 October 2025===
  end
{{FPER|answered=yes}}
elseif....
Please copy the [[Module:InfoboxImage/sandbox|sandbox]] to [[Module:InfoboxImage|main]].
</pre>
::::Will add it in a day or two if no objections made. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 08:56, 1 November 2016 (UTC)
:::::{{ping|WOSlinker}} I was so closeee!!! Thanks for the assistance. :-) --[[User:Zackmann08|<span style="color:DarkTurquoise;">Zackmann08</span>]] (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 16:44, 1 November 2016 (UTC)
::::::{{ping|Zackmann08}} I've now updated the module. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 13:53, 4 November 2016 (UTC)


== Adding drafts to tracking category ==
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)


Hello all. I wanted to see if we could revise this to add pages in the draft namespace to [[:Category:Pages using infoboxes with thumbnail images]]. It would help catch these before they get pushed to the main space. Doesn't make a huge difference but would be nice. :-) --[[User:Zackmann08|<span style="color:DarkTurquoise;">Zackmann08</span>]] (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 17:21, 15 December 2016 (UTC)
== UPDATE PROFILE IMAGE ==
 
{{edit fully-protected|Module:InfoboxImage|answered=yes}}
Please change the profile photo to the following image https://commons.wikimedia.org/wiki/File:Walter_Masterson.jpg [[User:Wikispiraling|Wikispiraling]] ([[User talk:Wikispiraling|talk]]) 23:54, 24 November 2025 (UTC)
: {{ping|Wikispiraling}} This page is for discussions concerning use and development of the module [[Module:InfoboxImage]]. I can only assume that you are intending to ask for the image you have mentioned to be put in the article [[Walter Masterson]]; if so the request belongs in the talk page of whatever article that is, not here. [[User:JBW|JBW]] ([[User talk:JBW|talk]]) 00:04, 25 November 2025 (UTC)
 
==Discussion at [[:Template talk:MergedMap]]==
[[File:Symbol watching blue lashes high contrast.svg|25px|link=|alt=]]&nbsp;You are invited to join the discussion at [[:Template talk:MergedMap]]. &#x0020;--<!-- Template:Please see --> [[User:Joy|Joy]] ([[User talk:Joy|talk]]) 12:48, 27 November 2025 (UTC)
 
== Captions ==
 
Is there a reliable way to get captions from wikidata? I don't think this module deals with captions at all, which is surprising. We have an issue on [[Template:Infobox martial artist]] where the caption is not always matching the image. This module was using the preferred image but [[Module:Wikidata]] was taking the caption from a different image &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:23, 6 January 2026 (UTC)
:That infobox is checking the image and caption params independently.
:<syntaxhighlight lang="wikitext">
{{if empty|{{{image|}}}|{{#invoke:Wikidata|claim|P18}}}}
{{if empty|{{{caption|}}}|{{#invoke:Wikidata|getImageLegend|FETCH_WIKIDATA}}}}
</syntaxhighlight>
:Maybe needs to check both params are empty before using any wikidata values?
:<syntaxhighlight lang="wikitext">
{{#ifeq:{{{image|}}}{{{caption|}}}||{{#invoke:Wikidata|claim|P18}}|{{{image|}}}}}
{{#ifeq:{{{image|}}}{{{caption|}}}||{{#invoke:Wikidata|getImageLegend|FETCH_WIKIDATA}}|{{{caption|}}}}}
</syntaxhighlight>
:[[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 10:04, 6 January 2026 (UTC)

Latest revision as of 15:59, 24 January 2026

Template:Permanently protected Template:Talk header User:MiszaBot/config Template:Archives

Other size parameters cause upright to be ignored

With the current implementation of this module, the upright parameter is ignored if the maxsize or sizedefault parameters are defined. This appears to be because image syntax ignores upright if a size in pixels is defined. It means that if either of those parameters are used in an infobox template (see {{Infobox bridge}} for example), then it's not possible to use the upright parameter at all in articles, which is not the intended behavior.

I don't have the Lua skills to do so, but I think the module should be rewritten so that a pixel size is not passed if the upright parameter is used and the size parameter is not. Pi.1415926535 (talk) 03:27, 30 May 2025 (UTC)

I think there are two separate cases to consider:
  1. Both |upright= and either |maxsize= or |sizedefault= are specified
  2. Both |upright= and |size= are specified
In the first case, I think the current module behavior is likely incorrect -- the caller specified a size via |upright= and it's being handled as if no size was specified. The second case is less clear, because conflicting sizes are being provided. I'm reluctant to change the current behavior for the second case, because there may be unintended consequences to the 5M articles that use this module.
Of course, fixing the incorrect behavior also may have unintended consequences, also, so we should be careful. For example, the proposed behavior now allows people to set absurd values to |upright= and there is no check or limit.
I've modified the sandbox to fix the first issue, and updated the tests to exercise the new code. Template:Pinging to see if they have any comments on the change: other editors are also welcome to comment. — hike395 (talk) 09:17, 30 May 2025 (UTC)
Later: I added some logic to ensure that |upright= doesn't produce an image larger than |maxsize=, assuming the default user preference. This fixes one potential issue. Updated sandbox and testcases. I'm hoping some other templateeditor or admin takes a look at the diff. — hike395 (talk) 10:01, 30 May 2025 (UTC)
@Hike395: Thanks for looking into this! Just to clarify - will this still allow an image scaled with upright to be larger than maxsize if the user preference is set to a larger-than-default value? That seems important for accessibility reasons. Pi.1415926535 (talk) 16:09, 30 May 2025 (UTC)
Yes: if upright is specified, then maxsize will scale with the user's default image size. So if maxsize=300, and the user's preferred thumbnail size is set to 300px, then the output image will be limited to be less than 300*300/220 = 409px for that user. There's no way to avoid this. — hike395 (talk) 00:39, 31 May 2025 (UTC)
Great, that is the behavior I believe it should have. Pi.1415926535 (talk) 00:45, 31 May 2025 (UTC)
To the original observation Template:Tq: this is expected behaviour, and is documented at WP:PICSIZE, inside the "Implementation details" box (direct link), last paragraph. --Redrose64 🌹 (talk) 13:39, 31 May 2025 (UTC)
Template:Ping Picking this back up. My sandbox edits do not contradict WP:PICSIZE. If a absolute size and an upright are both specified, then the absolute size is used. What I did was scale maxsize and sizedefault relative to the user preferred image size. Those two parameters are only defined in this module: WP:PICSIZE does not discuss them.
Is it ok to promote the sandbox to main? I see that since this edit, Pi.14 has removed maxsize and sizedefault from a number of infoboxes. It would be good to restore those, if I can promote sandbox to main. — hike395 (talk) 08:48, 5 August 2025 (UTC)
Template:Ping Any comments or thoughts before I propose this as an edit? Template:U just fully protected this Module, so I can no longer edit it, so even a simple support/agree would be helpful. — hike395 (talk) 14:46, 12 August 2025 (UTC)
To be clear, my full protection was completely unrelated to this dispute, which I didn't even know existed; if you look at my edits at the time I adjusted the protection level of hundreds of templates. * Pppery * it has begun... 17:35, 12 August 2025 (UTC)
If I'm understanding correctly what your edit does, I support it. I'm confused about your statement Template:Tq - to my knowledge, I haven't edited any infobox templates to remove these. Pi.1415926535 (talk) 05:12, 13 August 2025 (UTC)
Template:Ping apologies. I didn't mean to imply causation here -- I just wanted to point out that I can no longer edit the template directly.
Template:Ping more apologies. I recall seeing edits to infoboxes which removed maxsize and sizedefault, but now I cannot find them to check who did them. — hike395 (talk) 12:33, 13 August 2025 (UTC)

Edit request

Template:FPER Please copy Module:InfoboxImage/sandbox to Module:InfoboxImage

This is a change in handling the case where |upright= and either |maxsize= or |sizedefault= is specified. In this case, the sandbox version obeys |upright=, but if it exceeds maxsize/220, then it is set to maxsize/220. The current behavior is to ignore |upright= when either |maxsize= or |sizedefault= is specified, which is incorrect.

This edit does not change any behavior if |upright= is not specified. Also, if |size= and |upright= are both specified, the behavior remains unchanged: |size= is obeyed in that case.

Are you sure that this description is correct? On the testcases page, I am seeing the Mustela image with <syntaxhighlight>upright=1.5|sizedefault=272|maxsize=300</syntaxhighlight>. The live module renders the image at 1.5x my thumbnail size. The sandbox image is rendered at 272px. This seems to be the opposite of the description above, if I am reading it correctly. It also seems to be a fix that helps the module to match normal image rendering (px is preferred over upright). Is this what you want? – Jonesey95 (talk) 17:01, 15 August 2025 (UTC)
You may be interpreting the unit tests backward? Here are the results when main and sandbox are called with the case that you are highlighting:
{{subst:#invoke:InfoboxImage|InfoboxImage|image=Mustela erminea upright.jpg |upright=1|sizedefault=272|maxsize=300}}

File:Mustela erminea upright.jpg

{{subst:#invoke:InfoboxImage/sandbox|InfoboxImage|image=Mustela erminea upright.jpg |upright=1|sizedefault=272|maxsize=300}}

File:Mustela erminea upright.jpg

Here, the main module is generating a pic with size=272px, while the sandbox module is generating a pic with upright=1 (rendered at your preferred size). So the logic is correct.
The logic has not changed when both size and upright are specified. They are both emitted and MediaWiki prefers size over upright:
{{subst:#invoke:InfoboxImage|InfoboxImage|image=Mustela erminea upright.jpg |upright=1|size=200}}

File:Mustela erminea upright.jpg

{{subst:#invoke:InfoboxImage/sandbox|InfoboxImage|image=Mustela erminea upright.jpg |upright=1|size=200}}

File:Mustela erminea upright.jpg

hike395 (talk) 17:18, 15 August 2025 (UTC)
Indeed, I do not understand what "Expected" and "Actual" refer to on that page. I'm used to seeing the live template followed by the sandbox, with appropriate headers to match. In that case, and based on the apparent consensus above, I have no objections. It looks like this change will require an administrator, which I am not. – Jonesey95 (talk) 17:25, 15 August 2025 (UTC)
Template:Ping Do you object to this request? * Pppery * it has begun... 19:48, 15 August 2025 (UTC)
I'm not a Lua expert, and have never claimed to be. --Redrose64 🌹 (talk) 22:18, 16 August 2025 (UTC)

Template:Done * Pppery * it has begun... 04:35, 17 August 2025 (UTC)

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 <syntaxhighlight lang="text" class="" style="" inline="1">maxsize</syntaxhighlight> 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. Zackmann (Talk to me/What I been doing) 07:37, 30 September 2025 (UTC)

A few comments:
  1. 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.
  2. Looking at the usage of |sizedefault=, I see many templates use |sizedefault=frameless. With the current code, such a default will ignore maxsize.
  3. Looking at the usage of |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.
hike395 (talk) 10:11, 30 September 2025 (UTC)
We should not standardize on a pixel size, per MOS:IMGSIZE (Template:Tq). See the discussion above, which proposes to somehow default to the viewer's preferred thumbnail size, and the 2022 discussion that led to the one above. – Jonesey95 (talk) 10:44, 30 September 2025 (UTC)
Per Template:Diff, setting |maxsize= does not standardize on a pixel size. If we do set |maxsize=250, then it limits |size= to 250 and limits |upright= to 1.136. px is not forced or favored in any way.
Also -- I just cleaned up all uses of |sizedefault=frameless, so that is no longer a factor in any decision. — 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 sizedefault=frameless|maxsize=250 in my sandbox and got a 300px image, which is the same as my thumbnail preference. If I set sizedefault=frameless|maxsize=250|size=100, I get a 100px image. Based on that, it looks like a sizedefault maxsize 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. – Jonesey95 (talk) 14:12, 30 September 2025 (UTC)
To clarify: the behavior with |sizedefault=frameless is a bug. Maybe I should fix the bug rather than cleaning up occurrences of |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 maxsize=250 you should get 250px, if you try upright=1|maxsize=250 you should get 300px, while if you try upright=1.5|maxsize=250 you should get 340px (limited by maxsize). — hike395 (talk) 14:44, 30 September 2025 (UTC)
Yeah, now I'm confused again.
  • When I set maxsize=250, 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 |upright=1|maxsize=200, I get 270px (about 137% of maxsize, so it doesn't match maxsize or the upright setting).
  • When I set |upright=1|maxsize=250, I get 300px (my thumb size preference; this seems correct).
  • When I set |upright=1|maxsize=300, I get 300px (my thumb size preference; this seems correct).
  • When I set |upright=1.5|maxsize=300, 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. – 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=|size={{{image_size}}}|maxsize=300}}</syntaxhighlight> and then when used on an article with <syntaxhighlight inline lang=wikitext>Template:Infobox something</syntaxhighlight>, the image size would be limited to 300. -- WOSlinker (talk) 18:26, 30 September 2025 (UTC)

Template:Od To understand the behavior, see 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. — hike395 (talk) 22:37, 30 September 2025 (UTC)

Here is an example of what a default <syntaxhighlight lang="text" class="" style="" inline="1">maxsize</syntaxhighlight> would help prevent… - Zackmann (Talk to me/What I been doing) 01:06, 1 October 2025 (UTC)
Template:Ping sorry for the bad news, but that article uses {{Infobox royalty}} that already has |maxsize=300. Adding a default maxsize would do anything in this case. What this module produces with that input is [[File:Olu Atuwatse I Dom Domingos.jpg|300x|upright=1]]. 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. — hike395 (talk) 02:46, 1 October 2025 (UTC)
Template:Ping I added the |maxsize=300 Template:Diff as a result of finding that page. But good to know that maxsize wouldn’t have prevented it. Template:SmileyZackmann (Talk to me/What I been doing) 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. --Joy (talk) 10:18, 17 October 2025 (UTC)
And if Wikipedia:Image use policy#Displayed image size tells editors Template:Tq, then this module should also support relative sizes as well, instead of forcing this sort of pixel-based thinking from editors. --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. -- WOSlinker (talk) 17:59, 17 October 2025 (UTC)

Edit request 17 October 2025

Template:FPER Please copy the sandbox to main.

Two changes:

  1. (technical) --- factored out list of placeholder images and tracking categories into Module:InfoboxImage/data to neaten beginning of module
  2. (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 test cases.

Template:Pinging who brought this up. — hike395 (talk) 02:28, 18 October 2025 (UTC)

Template:Done -- WOSlinker (talk) 09:46, 18 October 2025 (UTC)

UPDATE PROFILE IMAGE

Template:Edit fully-protected Please change the profile photo to the following image https://commons.wikimedia.org/wiki/File:Walter_Masterson.jpg Wikispiraling (talk) 23:54, 24 November 2025 (UTC)

Template:Ping This page is for discussions concerning use and development of the module Module:InfoboxImage. I can only assume that you are intending to ask for the image you have mentioned to be put in the article Walter Masterson; if so the request belongs in the talk page of whatever article that is, not here. JBW (talk) 00:04, 25 November 2025 (UTC)

Discussion at Template talk:MergedMap

File:Symbol watching blue lashes high contrast.svg You are invited to join the discussion at Template talk:MergedMap. -- Joy (talk) 12:48, 27 November 2025 (UTC)

Captions

Is there a reliable way to get captions from wikidata? I don't think this module deals with captions at all, which is surprising. We have an issue on Template:Infobox martial artist where the caption is not always matching the image. This module was using the preferred image but Module:Wikidata was taking the caption from a different image — Martin (MSGJ · talk) 09:23, 6 January 2026 (UTC)

That infobox is checking the image and caption params independently.
<syntaxhighlight lang="wikitext">

Script error: No such module "Wikidata". Script error: No such module "Wikidata". </syntaxhighlight>

Maybe needs to check both params are empty before using any wikidata values?
<syntaxhighlight lang="wikitext">

Script error: No such module "Wikidata". Script error: No such module "Wikidata". </syntaxhighlight>

WOSlinker (talk) 10:04, 6 January 2026 (UTC)