Commons:Village pump/Technical
| Village pump/Technical |
| Bug reports |
| Code review |
| Tools |
| Tools/Directory |
| Idea Lab |
This page is used for technical questions relating to the tools, gadgets, or other technical issues about Commons; it is distinguished from the main Village pump, which handles community-wide discussion of all kinds. The page may also be used to advertise significant discussions taking place elsewhere, such as on the talk page of a Commons policy. Recent sections with no replies for 30 days and sections tagged with {{Section resolved|1=--~~~~}} may be archived; for old discussions, see the archives; recent archives: /Archive/2025/12 /Archive/2026/01.
- Feature or bug reports should be filed on Phabricator (see how to report a bug). Bugs with security implications should be reported differently (see how to report security bugs).
- Have you read the FAQ?
| SpBot archives all sections tagged with {{Section resolved|1=~~~~}} after 1 day and sections whose most recent comment is older than 30 days. | |
Sorting files in a category by the number of categories the files have?
[edit]Is this possible somehow?
It would also be useful for Wikipedia articles.
Here, in the case of Category:NIH BioArt, I'd like to either filter for files with only the (currently) 2-3 meta-categories set or sort the files by number of categories to add categories to those files that miss them.
Most of these files don't have categories set and currently one can't filter away the ones that already got some. Categorization request here. Prototyperspective (talk) 00:47, 3 December 2025 (UTC)
- Does https://quarry.wmcloud.org/query/99622 work? Bawolff (talk) 02:48, 3 December 2025 (UTC)
- Very cool. I imagine this could be useful in many cases. Maybe a script/gadget could be built using this that enables seeing the results (1) from the click of the button on the category page (e.g. under Tools "List files by number of cats") and (2) in wikitext so you can click the file links. Currently, a main problem here is that the file links are not clickable.
- Moreover, it would be better if not needed if the files had a preview/thumbnail. Do you think it would be possible to make this a native sorting feature? Because with native MediaSearch sorting one could search e.g. use deepcategory:Category:NIH BioArt and then just sort by number-of-categories.
- A hacky way would be, if I'm not mistaken, to export it as wikitable and then using VsCodium or a text-editor like it to search and replace prepend
[[File:and append|thumb]]and then paste it manually into some page on Commons. Prototyperspective (talk) 21:20, 4 December 2025 (UTC)- Some sort of gadget or toolforge tool would be possible (To be clear, I'm not necessarily volunteering to make one). Its unlikely this would be built into mediawiki, as this category sorting method becomes slow for very large categories, which is a no-no for anything built into mediawiki. Bawolff (talk) 21:53, 4 December 2025 (UTC)
- For your hacky way - we can do that with quarry. Try this link https://quarry.wmcloud.org/run/1046668/output/0/wikitable which outputs a table you can paste into commons. Bawolff (talk) 22:16, 4 December 2025 (UTC)
- Thanks! I think it his can be quite useful in many occasions for dynamically improving categorization of some cat by users (works best with flat cats and is especially useful for categories with new files such as after batch uploads). Maybe it could also be useful for some report, e.g. for files uploaded as part of challenges like the Commons:Wiki Science Competition 2025 where good files often don't have categories other than the hidden meta categories set.
- A problem is that one needs to put this on a Commons page and click preview to be able to use the results (being able to click the file links and see thumbnails if that's enabled). Also, currently one needs to fork the query and run it on Quarry which is impractical and inaccessible to most users.
- If nobody here is interested in creating a tool for this, I'll probably make a wish in the m:Community Wishlist. It could be a gadget that adds an entry to the Tools menu like "List files by number of cats".
- Query for the output https://quarry.wmcloud.org/query/99690
- @Don-vip: By the way, you may be interested in that query – the example category is for a batch import you recently implemented (thanks again). Prototyperspective (talk) 19:20, 10 December 2025 (UTC)
- Nice! vip (talk) 19:42, 10 December 2025 (UTC)
Need SQL query for geolocated images before date X
[edit]Hello! I would like to create a current chart showing the number of geolocated images up to date X. I tried this at https://quarry.wmcloud.org/query/99798, but "WHERE img_timestamp < 20101206235959" is not recognized. How can this be fixed? Thanks --PantheraLeo1359531 😺 (talk) 13:05, 7 December 2025 (UTC)
- https://quarry.wmcloud.org/query/99805# is the basic way of how to do that, but i think a smarter method is needed as that query is very slow. Bawolff (talk) 19:02, 7 December 2025 (UTC)
- p.s. If an image has multiple sets of coordinates, its possible it might get counted twice. I'm not sure if its even possible to have multiple coordinates or how common that is. Bawolff (talk) 03:39, 8 December 2025 (UTC)
- @Bawolff: an image may easily have both {{Location}} and {{Object location}} templates with different coordinates. MKFI (talk) 09:48, 8 December 2025 (UTC)
- So we need a parameter that counts a single file as 1, not more? --PantheraLeo1359531 😺 (talk) 17:45, 8 December 2025 (UTC)
- I changed the query to do that, but that might make it slower so it might timeout. It might all be a moot point if no files have multiple coordinates. Bawolff (talk) 18:55, 8 December 2025 (UTC)
- Looks like it worked and did change the answer by quite a bit. Bawolff (talk) 19:15, 8 December 2025 (UTC)
- Thank you a lot :) --PantheraLeo1359531 😺 (talk) 19:28, 9 December 2025 (UTC)
- @Bawolff Following queries are faster during execution :) --PantheraLeo1359531 😺 (talk) 16:47, 10 December 2025 (UTC)
- Looks like it worked and did change the answer by quite a bit. Bawolff (talk) 19:15, 8 December 2025 (UTC)
- I changed the query to do that, but that might make it slower so it might timeout. It might all be a moot point if no files have multiple coordinates. Bawolff (talk) 18:55, 8 December 2025 (UTC)
- So we need a parameter that counts a single file as 1, not more? --PantheraLeo1359531 😺 (talk) 17:45, 8 December 2025 (UTC)
- @Bawolff: an image may easily have both {{Location}} and {{Object location}} templates with different coordinates. MKFI (talk) 09:48, 8 December 2025 (UTC)
- p.s. If an image has multiple sets of coordinates, its possible it might get counted twice. I'm not sure if its even possible to have multiple coordinates or how common that is. Bawolff (talk) 03:39, 8 December 2025 (UTC)
Any way to identify files with closed captions missing the ClosedCaptions template?
[edit]There are many files with TimedText subtitles but missing the {{Closed captions}} template (example: Special:Diff/1128180107).
The template is useful because it allows people to easily see that and which subtitles are available on thje file page and because it sets categories like Category:Files with closed captioning in English which can e.g. be used for filtering, searching, and glamorous usage scans etc.
Is there a way to identify these files and if possible also to add that template to these automatically? Prototyperspective (talk) 11:47, 9 December 2025 (UTC)
- Hello @Prototyperspective, I made this SQL query to look for files with TimeText pages, but without the {{Closed captions}} template. The query shows there are 7824 files with this case. Thanks. Tvpuppy (talk) 14:24, 10 December 2025 (UTC)
- Amazing, thank you very much! Do you know of a way to add the template to these files automatically? I think VisualFileChange could be used for that but it only works on categories, searches, etc and not Quarry outputs afaik. If not, it may be best to make a new thread at Bot work request so that a bot adds it based on the query export. Prototyperspective (talk) 14:53, 10 December 2025 (UTC)
- No, I don't. I would like to know if there's a way to do it automatically as well. Tvpuppy (talk) 15:26, 10 December 2025 (UTC)
- Amazing, thank you very much! Do you know of a way to add the template to these files automatically? I think VisualFileChange could be used for that but it only works on categories, searches, etc and not Quarry outputs afaik. If not, it may be best to make a new thread at Bot work request so that a bot adds it based on the query export. Prototyperspective (talk) 14:53, 10 December 2025 (UTC)
Enhance NoFoP-category with year the item becomes PD
[edit]There's a suggestion at Template talk:NoFoP-category#Year that the images become free suggesting that {{NoFoP-category}} include a field to store the year that the subject becomes Public Domain, after which the category can be removed or replaced, and any deleted items undeleted. Posting here for visibility, input is appreciated. -Consigned (talk) 10:22, 10 December 2025 (UTC)
Abuse filter makes it impossible to start a DR for timed text
[edit]Apparently an abuse filter makes it impossible to start a DR for timed text, because it won't allow anything but timed text on the page. I am trying to start a DR for TimedText:WIKITONGUES-_Aminah_Abba_speaking_Wolof.webm.en.srt; here is what would go on that page:
{{delete|reason={{U|Jumbo T}} says (at [https://commons.wikimedia.org/w/index.php?title=Commons:Help_desk&oldid=1128926632#Delete_incorrect_captions?] that the captions here are wrong and this should be deleted, but that for some reason they could not start the DR themself. I have no Wolof, so I have no independent opinion of whether that is correct. Jumbo T, would you please explain in more detail what is wrong here (entirely wrong? needs editing? etc.)|subpage=TimedText:WIKITONGUES- Aminah Abba speaking Wolof.webm.en.srt|year=2025|month=December|day=10}}
Jmabel ! talk 22:04, 10 December 2025 (UTC)
- I also have no Wolof, but I reckon you can agree it's clear that she's not telling people how to change the language on Google Sites (not least because of all the English words that you can hear her say that don't seem to appear in the captions). Jumbo T (talk) 00:17, 11 December 2025 (UTC)
- Given that and the fact that Hellomyfriends1222, who created this file, looks to have been at least a borderline vandal, I will simply delete the file, but the technical issue remains: it is currently impossible to start a DR for timed text. - Jmabel ! talk 01:16, 11 December 2025 (UTC)
- Thanks JMabel. BTW, the Russian language subs at TimedText:WIKITONGUES-_Aminah_Abba_speaking_Wolof.webm.ru.srt are just a translation of the incorrect English subs into Russian and should be deleted too. Jumbo T (talk) 16:29, 11 December 2025 (UTC)
- I believe the same is true of some other special types of pages like translations and Data: pages. It might be nice if scripts like QuickDelete could be modified to allow nominations without a {{Delete}} template on the page when it's technically impossible to insert. Omphalographer (talk) 20:06, 11 December 2025 (UTC)
- Given that and the fact that Hellomyfriends1222, who created this file, looks to have been at least a borderline vandal, I will simply delete the file, but the technical issue remains: it is currently impossible to start a DR for timed text. - Jmabel ! talk 01:16, 11 December 2025 (UTC)
Where do I put the GraphViz code?
[edit]For the images generated with (my own) GraphViz code, where do I put the code? Example of my ugly first try: File:Deregulated electrical market - single purchaser configuration.svg. Викидим (talk) 21:37, 12 December 2025 (UTC)
- Unless someone can give you a better answer within a day or two, just put it on the file page inside a <code> element. At least it will be safe until someone works out a better way to do this. - Jmabel ! talk 23:50, 12 December 2025 (UTC)
Receiving reply notification when subsequent DRs are added to daily page
[edit]In the past few days I've noticed that after submitting a deletion request and having it posted to the daily page like Commons:Deletion requests/2025/12/14, I'm notified when new DRs are added below.
For example today I posted a DR at 10:52, and then I received a notification Yann replied in "December 14"
when Yann added a new DR below it at 10:54, then I was notified again with Belbury replied in "December 14"
when the next DR was added at 11:15. I first noticed this on Dec 10 and it seems to happen both after using "Nominate for deletion" link in the sidebar and also COM:VFC.
I don't think I changed my preferences recently, has the auto-subscribe logic changed? -Consigned (talk) 11:28, 14 December 2025 (UTC)
- Investigating a bit further - looks like posting a DR is automatically subscribing me to the == December 14 == heading at the very top of the page, under which each DR is added as a level 3 heading... -Consigned (talk) 11:42, 14 December 2025 (UTC)
>Moving this to mediawikiwiki:Talk:Notifications#Automatically subscribed after adding to daily Commons DR page as it seems to relate to the Notifications tool rather than Commons functionality. Please respond there if you have any insight or if it also affects you. -Consigned (talk) 12:26, 14 December 2025 (UTC)
Comment, there's a related discussion at Commons:Village pump#Notifications. Thanks. Tvpuppy (talk) 17:05, 14 December 2025 (UTC)
- Is there a phabricator issue about this? Prototyperspective (talk) 16:21, 15 December 2025 (UTC)
A solution has been implemented in phab:T412462. However, maintainers of AjaxQuickDelete will still need to update the gadget to use that solution to actually fix the immediate issue here. – Ammarpad (talk) 18:20, 16 December 2025 (UTC)
- I've added some notes, and a hesitant ping, at MediaWiki talk:Gadget-AjaxQuickDelete.js#Requested change to add discussiontoolsautosubscribe parameter, which will hopefully help resolve this. Quiddity (WMF) (talk) 21:08, 16 December 2025 (UTC)
- I encounter the issue even when I manually add a DR to the daily page like Commons:Deletion_requests/2025/12/17 (e.g. diff), following the steps at Commons:Deletion requests/Listing a request manually, not using VFC or "Nominate for deletion" button. I don't think that updating AjaxQuickDelete will solve the entire problem. -Consigned (talk) 09:45, 17 December 2025 (UTC)
Love search result
[edit]
Why do images of Diddy appear when I look up "love" in Commons search??? Is this some kind of prank? – Howardcorn33 (💬) 13:15, 15 December 2025 (UTC)
- One of his stage names was "Love". Sjoerd de Bruin (talk) 13:28, 15 December 2025 (UTC)
- One of the reasons for why W471: When searching Commons, if there is a category with same or very similar title, show a hint/link (voting on it is open) would be useful (here to find relevant files especially when the search engine shows lots of unrelated files).
- To answer your question: it seems to be because MediaSearch uses Wikidata a lot and specifically also the aliases defined there and one alias defined for Sean Combs (Q216936) is "Love". MediaSearch needs lots of improvements such as considering categorization much more than SD's Wikidata aliases if the latter is considered at all. Prototyperspective (talk) 15:30, 15 December 2025 (UTC)
- Ah, I see now. I hope the search function improves in this regard. – Howardcorn33 (💬) 15:38, 15 December 2025 (UTC)
Tech News: 2025-51
[edit]Latest tech news from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. Translations are available.
Updates for editors
View all 18 community-submitted tasks that were resolved last week. For example, one of the fixes addressed an issue for temporary accounts adding an external URL, which triggered an hCaptcha request in more cases than intended, and did not display the required popup on the first attempt to publish the edit. [1]
Updates for technical contributors
- To improve database and site performance, external links to Wikimedia projects will no longer be stored in the database. This means they will not be searchable in Special:LinkSearch, will not be checked by the Spam Blacklist or AbuseFilter as new links, and will not be in the
externallinkstable on database replicas. In the future this may be extended to other highly-linked trusted websites on a per-wiki basis, such as Creative Commons links on Wikimedia Commons. [2] Detailed code updates later this week: MediaWiki
Tech news prepared by Tech News writers and posted by bot • Contribute • Translate • Get help • Give feedback • Subscribe or unsubscribe.
MediaWiki message delivery 18:59, 15 December 2025 (UTC)
Legacy interwiki links
[edit]Does this search query show all the categories with the legacy way to connect pages interwiki? I kind of doubt just this few categories have the dysfunctional legacy interwikilinks (they need to be moved to Wikidata). Prior discussion here by User:Immanuelle. Prototyperspective (talk) 16:38, 21 December 2025 (UTC)
- I did some testing just now with https://regex101.com/. You might want to replace
[a-z][a-z]with another[a-z]{2,3}(not sure if that ever arises, but harmless), but at least according to that tester it should work pretty much as expected. Here was my test case, which covers a lot of ground:
[[en:whatever]]
[[de-au:Whatever it may be]]
[[de-au:Grün]]
[[ru-sum:что бы ни]]
[[en-us:Color]] [[en-gb:Colour]]
- At least according to the tester, it matches all six as expected (including diacritic in
Grün, non-Latin characters in Russian, and having the last two links on a single line). - @Prototyperspective: Offhand I'd have to guess something is wonky in using regexes in mediasearch; the same search string produces a LOT more results with Special:Search. - Jmabel ! talk 20:12, 21 December 2025 (UTC)
- Thanks. Even after making that change and using Special:Search instead (like so), it still only shows 27 results. Prototyperspective (talk) 21:04, 21 December 2025 (UTC)
- @Prototyperspective: Strange. If you eventually find things it missed, please let me know & I'll see what I didn't think of in designing the regex. - Jmabel ! talk 02:05, 22 December 2025 (UTC)
- Thanks. Even after making that change and using Special:Search instead (like so), it still only shows 27 results. Prototyperspective (talk) 21:04, 21 December 2025 (UTC)
Interface message for switching search type
[edit]When you perform a search, the gray box at the top says Looking for Special:Search?
(MediaWiki:Mediasearch-user-notice-title) Clicking on the link in that just opens a blank Special:Search page, though, removing your query. The "Switch to Special:Search" link in the upper right (MediaWiki:Mediasearch-switch-special-seach [sic]) works much better, preserving your query. Could we get the gray box link to do the same?
Cheers, Sdkb talk 03:41, 22 December 2025 (UTC)
- For those looking for this (as I was), you can only see this message once, if you dismiss it, it's gone forever. —TheDJ (talk • contribs) 10:32, 22 December 2025 (UTC)
- The message is rendered without having access to the parameters. So fixing this requires filing a ticket in Phabricator. —TheDJ (talk • contribs) 10:32, 22 December 2025 (UTC)
- Done; see phab:T413392. Cheers, Sdkb talk 19:30, 22 December 2025 (UTC)
Sorting files in a category according to the first letter of a word: bot or RegEx
[edit]The files are audio pronunciation files in Estonian. All the file names follow the pattern Et-<term>.ogg. They need to be categorized as [[Category:Estonian pronunciation|<first letter of the term>]] or [[Category:Estonian pronunciation|<term>]] (which I think is exactly the same). Since there are 6000 files, I would rather not click through 6000 links to do this manually. Some people have said that I should use RegEx, but I'm not very skilled in coding and I couldn't find anybody to do it for me either. But I was thinking that maybe this could be done by a bot, which would certainly make things easier. I haven't uploaded the files yet, I just want to know if that's possible and is anybody ready to do it. Joonas07 (talk) 17:39, 22 December 2025 (UTC)
- Yes I can do it easy in VisualFileChange REAL 💬 ⬆ 17:59, 22 December 2025 (UTC)
- Does it require coding skills or no? In the sense that could I do it myself or better leave it to you? Joonas07 (talk) 20:57, 22 December 2025 (UTC)
- Not hard here is 1 way to do it you can see I did it here and subsequent edits
- Does it require coding skills or no? In the sense that could I do it myself or better leave it to you? Joonas07 (talk) 20:57, 22 December 2025 (UTC)
1st search
/\[\[[cC](?:ategory|at):[Ee]stonian[_ ]pronunciation\]\]/g
Replace
[[Category:Estonian pronunciation|%PAGENAME%]]
Next search
/\[\[Category:Estonian pronunciation\|Et\-/g
Final part not essential
/(\[\[Category:Estonian pronunciation.*)\.(?:og[ga]|mp3|wav|mid|midi|flac)/g
$1
REAL 💬 ⬆ 00:00, 23 December 2025 (UTC)
- Thanks! Happy holidays! Joonas07 (talk) 10:02, 23 December 2025 (UTC)
Tech News: 2025-52
[edit]Latest tech news from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. Translations are available.
Updates for editors
- From January, edit filters can be set to automatically suppress their details such as rules and list of attempted edits and actions. This will help oversighters use edit filters to prevent doxxing or other suppressible material. [3]
- The next issue of Tech News will be sent out on 12 January 2026 because of the end of year holidays. Thank you to all of the translators, and people who submitted content or feedback, this year.
View all 16 community-submitted tasks that were resolved last week. For example, the crash that occurred when tapping "First Steps" in the Wikipedia Android Year in Review has now been fixed, and the feature opens as expected. [4]
Updates for technical contributors
- Interface elements such as diffs and categories generated by MediaWiki used to have the attribute
data-mw="interface"to distinguish from wiki content. The attribute has been replaced withdata-mw-interface="", to avoid potential conflicts with otherdata-mwattributes, which are generated by Parsoid. [5] There is no new MediaWiki version this week or next week.
Meetings and events
- The Wikimedia Hackathon Northwestern Europe 2026 will take place on 13-14 March 2026 in Arnhem, the Netherlands. Applications just opened mid-December and will close in mid-January or earlier if capacity is reached. With space for approximately 100 participants, early application is encouraged.
Tech news prepared by Tech News writers and posted by bot • Contribute • Translate • Get help • Give feedback • Subscribe or unsubscribe.
MediaWiki message delivery 21:42, 22 December 2025 (UTC)
Scanned images with a front and back
[edit]I’m currently uploading scans of old Carte de Visites. They have content on both sides. For each one, I am inclined to upload a side by side, and also each side individually - 3 files total - since there are different use cases. Is that correct? ~2025-42162-94 (talk) 08:28, 23 December 2025 (UTC)
- I'd upload the front and back as separate files, and use the other_versions field in the file description template to tie the two together, personally. The various projects have templates that can display two images side by side without the needf to have them as one file. The Squirrel Conspiracy (talk) 08:36, 23 December 2025 (UTC)
- That makes a lot of sense, thank you! I’ll try what you suggested. The Edinburgh Early Photography Archive (talk) 08:48, 23 December 2025 (UTC)
- @~2025-42162-94 and The Edinburgh Early Photography Archive: see also File:Bagley Hall, University of Washington, ca. 1910 - DPLA - 924e8711bb9227e3e04d29b7f683f919 (page 1).jpg for another good way of doing this. - Jmabel ! talk 19:30, 23 December 2025 (UTC)
- That makes a lot of sense, thank you! I’ll try what you suggested. The Edinburgh Early Photography Archive (talk) 08:48, 23 December 2025 (UTC)
Creator template has no link to works by creator on Commons
[edit]When I add a Creator to Author, for example Creator:Samuel Alexander Walker, there's no automatic link anywhere in Creator to other works by him on Commons. I realise I can link manually to "Category:Samuel Alexander Walker". But I don't think the Category page auto-populates with works tagged with the Creator tag, and it can also contain lots of things that aren't by the Creator (eg portraits of the Creator), so it's not useful for the purpose of finding all (and only) works with a certain Creator tag.
Shouldn't there be some automatic page that displays all (and only) works tagged with a Creator tag, for example "Works:Samuel Alexander Walker"? Am I missing something? The Edinburgh Early Photography Archive (talk) 06:58, 24 December 2025 (UTC)
- @The Edinburgh Early Photography Archive: I don't think that would be at all easy to do automatically, especially because for a given author there may or may not be a subcategory along the lines of Category:Works by Samuel Alexander Walker, and if that category does exist it may or may not have subcategories of its own. (See Category:Works by Pablo Picasso for a fairly good example of how complicated that can get.)
- So, in short: yes, things like that are good categorization; no, it is not readily automated. - Jmabel ! talk 20:01, 24 December 2025 (UTC)
Public domain template
[edit]Hi. I made a new public domain template specifically for Saint Helena, Ascension and Tristan da Cunha: {{PD-SHN}}. Please comment on it to see if I got the template code format correctly, thanks. – Howardcorn33 (💬) 22:53, 24 December 2025 (UTC)
PD-Art vs PD-Scan tag for old photos
[edit]For old photos in the public domain, where the digitiser asserts copyright (for example the National Portrait Gallery), and it is not clear if the digitisation of the old photo was done as a photograph or as a scan, is it more appropriate to use the PD-Art tag or the PD-Scan tag? The Edinburgh Early Photography Archive (talk) 23:45, 26 December 2025 (UTC)
- {{PD-scan}} is just a redirect to {{PD-art}}. - Jmabel ! talk 00:23, 27 December 2025 (UTC)
- I'm so sorry that I keep asking what are probably stupid questions! I thought PD-scan says "a mere mechanical scan or photocopy" whereas PD-art says "a faithful photographic reproduction". I was just wondering which one is more appropriate when it's not clear whether the digitisation was done via photo or scan. The Edinburgh Early Photography Archive (talk) 00:40, 27 December 2025 (UTC)
- @The Edinburgh Early Photography Archive: oops, my mistake: it's en-wiki that combined the two, Commons keeps them separate. But the former speaks volumes about how unimportant the distinction is. - Jmabel ! talk 17:46, 27 December 2025 (UTC)
- I'm so sorry that I keep asking what are probably stupid questions! I thought PD-scan says "a mere mechanical scan or photocopy" whereas PD-art says "a faithful photographic reproduction". I was just wondering which one is more appropriate when it's not clear whether the digitisation was done via photo or scan. The Edinburgh Early Photography Archive (talk) 00:40, 27 December 2025 (UTC)
Discord Embeds Broken
[edit]Most images sent to Discord from Wikimedia Commons do not load their preview images in the embed, ever since 2 or 3 days ago. Some do, my testing shows a trend that images featured on the current main page for Wikipedia tend to load, (sending myself https://commons.wikimedia.org/wiki/File:Neptune_Voyager2_color_calibrated.png on discord loads the preview image in the embed, for example) yet most others do not (sending myself the non-main page image https://commons.wikimedia.org/wiki/File:Neptune_-_August_19_1989_(39736246694).jpg refuses to load the preview image in the embed, as a counter-example), though it's not entirely consistent. Old Wikimedia Commons links sent in Discord have also had their previously loadable preview embeds fail to load upon cache refresh. Other websites like YouTube, (Fx)Twitter and Internet Archive still load embeds fine. I love sending images that I find in Wikimedia Commons to my friends a lot, so finding help would be important, though since my issue is technically based on another website / app, I'm not entirely sure if posting here is appropriate. Jd vance don't like me (talk) 02:58, 28 December 2025 (UTC)
- Probably relates to the recent limiting of what image sizes can be generated, same thing that messed up the TinEye and Google Lens tools. - Jmabel ! talk 07:39, 28 December 2025 (UTC)
- Do note that Discord has some custom mechanics for Wikipedia previews, not something we can easily fix from our side. Sjoerd de Bruin (talk) 09:46, 28 December 2025 (UTC)
- @Jmabel: Just for my reference, any links/announcements regarding image size generation limits? Haven't heard about that. ~Kevin Payravi (talk) 01:08, 5 January 2026 (UTC)
- Nothing that I'm aware of, but I gather this briefly broke the links to TinEye and Google Lens, because they were using a specific hard-coded size that is no longer supported. Can't recall where I heard that, sorry. - Jmabel ! talk 01:29, 5 January 2026 (UTC)
How to specify a SVG file's default language?
[edit]At File:Wissenschaftssprachen NatWi.svg how does one specify that default language there is German? It would be best if in the dropdown just had German and English and not (default language) and English. Prototyperspective (talk) 23:14, 3 January 2026 (UTC)
- It's not possible, without modifying the svg. A workaround here is to explicitly add German translations, the same way you added the English ones. (It may seems duplicative, since the default text is already German, but it would work.) If you do that, you'd get 3 options 'English - German - default' in the dropdown. – Ammarpad (talk) 18:22, 4 January 2026 (UTC)
- The semantics of SVG's systemLanguage attribute imply the default clause does not have a language. Consequently, a multilingual SVG file should have an explicit systemLanguage for each language and a default clause to cover all other languages. Otherwise, strange behavior happens. For example, if my browser prefers German over English, I expect to see German when displaying File:Wissenschaftssprachen NatWi.svg in my browser, but my browser will display English text. The browser does not know the default clause is German, so it displays the less-preferred (but known) English.
- It would be nice if SVG Translate learned the default language and copied the default clause to an explicit language clause.
- The simple fix is to use SVG Translate to translate the default language to German.
- Glrx (talk) 19:42, 4 January 2026 (UTC)
- Thanks for your elaborations – so would the optimal solution be for SVG Translate to be changed to detect or allow the user to specify the name of the SVG's default language and then copy "the default clause to [the] explicit language clause"? If that was done, would a SVG with one language when translated into a second language then have three values in the dropdown? (Here German, English, default language.) If so, I'd create a code issue about that. I think it would be better if after translating there were just two values (Here German (default), English) but don't know how that would be possible. Prototyperspective (talk) 23:55, 5 January 2026 (UTC)
- Glrx (talk) 19:42, 4 January 2026 (UTC)
- @Prototyperspective: Fixing SVG Translate would be a solution, but it would still list a separate default language. A separate default language makes sense given the semantics of systemLanguage. It also makes practical sense: a file may use the ISO date 2026-01-06 as the default, but use "Jan. 6, 2026" for an English date and other appropriate INTL dates for other languages. I would not create an issue because SVG semantics do not mean German (default), English. Multilingual SVG has many issues. Glrx (talk) 20:45, 6 January 2026 (UTC)
- Another way to look at it, is that SVG knows no default language. There is only fallback text of an unspecified language. This is actually pretty common in media formats as language information is generally not so critical. Commons itself does the same. Commons has the file information template, but there is no requirement on users to define which language they are using. We sometimes add that with the language templates, but its optional and thus cannot be relied upon. —TheDJ (talk • contribs) 21:05, 6 January 2026 (UTC)
- …hence the question about enabling users to specify what the file's default language is. Also the UploadWizard, the most-used recommended default way to upload files, asks the user to specify the language of the file description. Prototyperspective (talk) 23:59, 6 January 2026 (UTC)
A separate default language makes sense
Are you saying German, English, default language here makes more sense than just having German (default), English? If so, I don't understand why.because SVG semantics do not mean German (default), English
This is also an enigma to me – I only added that I think it would be best if there were just two values in this case instead of three (one redundant as exactly the same as default language). The main issue here is about enabling users to specify what that unspecified "(default language)" of the file is which currently has just the (default language) label in the dropdown which means people can't see 1 of the languages the file is available in, the language of the original SVG. Could you elaborate? Prototyperspective (talk) 00:04, 7 January 2026 (UTC)
- Another way to look at it, is that SVG knows no default language. There is only fallback text of an unspecified language. This is actually pretty common in media formats as language information is generally not so critical. Commons itself does the same. Commons has the file information template, but there is no requirement on users to define which language they are using. We sometimes add that with the language templates, but its optional and thus cannot be relied upon. —TheDJ (talk • contribs) 21:05, 6 January 2026 (UTC)
- @Prototyperspective: Fixing SVG Translate would be a solution, but it would still list a separate default language. A separate default language makes sense given the semantics of systemLanguage. It also makes practical sense: a file may use the ISO date 2026-01-06 as the default, but use "Jan. 6, 2026" for an English date and other appropriate INTL dates for other languages. I would not create an issue because SVG semantics do not mean German (default), English. Multilingual SVG has many issues. Glrx (talk) 20:45, 6 January 2026 (UTC)
- @Prototyperspective:
- For this file, the default text would be the same as the German, so for this file German (default), English makes sense. However, that is not the general case. Multilingual SVG files should include default as a separate option. Many multilingual SVG files do not have separate translations for numerical values — they just default to "123" for all languages.
- The language for the default clause is not specified; it could be any language or no language at all. That's why I gave the ISO 8660 date example. That the language is recognizable as German or English or Swahili in some SVG files does not mean that is the case in all SVG files. The SVG specification is the problem. It does not allow us to say display a preferred language if available but otherwise display German (or French or English). It only allows a fallback to an unspecified language.
- MW also contributes to the confusion. An author creates an SVG image in German, and the image displays in German. Then somebody uses SVG Translate to add English labels. After that, MW displays the image English rather than German. Something that probably confuses the original author. Commons displays English; if English is not available, then it displays the default. The original German image displays German not because German is asked for but because English is asked for but not available.
- To put it bluntly, MW did not know the original version was in German. GNU Plot did not add xml:lang="de" or lang="de". Even if it did that, most utilities and MW would ignore the attribute. The language was default at the beginning.
- Given the semantics of SVG, the simplest thing to do is to show a default language.
- Multilingual SVG is a hack. It is easy for browsers to support because it is simple and follows other conditional constructs. However, few tools support the generation or editing of multilingual SVG.
- Glrx (talk) 20:29, 7 January 2026 (UTC)
- Well wouldn't the solution to this simply be to not require the language to be specified but also allow the (default language) value with language unspecified? That could be used e.g. for charts with just numbers that are used across very many languages and not specific to one.
- However, I wasn't asking about making it a requirement to specify the language or whether SVGs can always detect and display the language – just about specifying the language in the ambiguous (default language) to be specifiable for the translated data graphics where there the default is in a specific language (probably >98% of cases). Or if it's already possible, how to do so.
- I think you're talking about a separate issue where SVG can't show the version in the language the user has specified in the config. But my prior comment and originally this thread is not about that. It's about what the user sees when they click on the languages dropdown, not which language version displays by default. So I think we have been talking past each other a bit. I think your issue warrants a separate discussion and/or issue. Prototyperspective (talk) 01:11, 8 January 2026 (UTC)
Chunked upload error
[edit]Trying to use chunked upload to overwrite File:Port of Seattle map, 1918.jpg with an even higher-resolution file, I got an error that MwJSBot is not defined. File I was uploading shows in MS Windows "properties" as 100MB, but is apparently a tad too large for a non-chunked upload. - Jmabel ! talk 23:46, 4 January 2026 (UTC)
- This would probably be an issue with User:Rillke/bigChunkedUpload.js user script and not chunked upload in general. Bawolff (talk) 03:30, 8 January 2026 (UTC)
- @Bawolff: so how would I work around this to overwrite that file? - Jmabel ! talk 04:10, 8 January 2026 (UTC)
Change in wiki commons rate-limiting? Getting frequent 429 - errors on wiki commons image requests
[edit]I have an app (ios / android) that is displaying images from wikimedia commons (Hotlinking) that has been out for over a year. About a week ago I started seeing a massive increase of 429 - Too many Requests responses. Nothing on our side has changed, the requests come from user devices (and IPs) and the 429 responses come after about 10-20 requests (request volume hasn't changed either). This seems to be a problem for other projects as well as evidenced by this reddit thread and this bug report. I am sending a user agent with requests as recommended here. Bbbub (talk) 11:14, 5 January 2026 (UTC)
- Wikimedia is applying much stricter IP rate limiting yes. You can thank the AI bots. —TheDJ (talk • contribs) 12:41, 5 January 2026 (UTC)
- I understand that wikimedia needs to guard it's resources against misuse but to me it doesn't seem like normal ratelimiting, we see these 429 responses with very low requests (10-20), other developers (in the linked thread) mentioned getting it for single requests. Additionally other requests sent directly afterwards might go through. Bbbub (talk) 08:01, 6 January 2026 (UTC)
- @Bbbub Oh, another thing is, that only specific thumbnail sizes are still allowed. If you are manipulating URLs to get your image to fit to a certain dimension, you will also see this erroring with 429s. —TheDJ (talk • contribs) 12:43, 5 January 2026 (UTC)
- I am working with different thumbnail size brackets (..., 640, 800, 960, ...) for different screen sizes. I am pretty sure I got the sizes originally from Wikimedia, but let me know if there has been a change or a source for the allowed thumbnail sizes so I can verify. Bbbub (talk) 07:37, 6 January 2026 (UTC)
- Another problem. You should set the
loading=lazyattribute on the img, so that you only download images that are actually likely to be within view. This is especially needed for things like this kind of gallery code. —TheDJ (talk • contribs) 12:46, 5 January 2026 (UTC)- This is a pretty important one for you specific use case. If you are requesting 30 images that all still need to be generated, even though only 15 are visible, then you will quite quickly run into rate limits. —TheDJ (talk • contribs) 13:25, 5 January 2026 (UTC)
- We're only loading the images that come into view, and we're seeing 429 responses with 10-15 images loading already, and in the linked reddit thread others described seeing it for one-off loads as well. Bbbub (talk) 07:43, 6 January 2026 (UTC)
- Ah and you are using thumb.php. Thumb.php which isn't generally used for wikimedia traffic as it is the endpoint for on demand generation of a thumbnail. Wikimedia uses: https://upload.wikimedia.org —TheDJ (talk • contribs) 12:54, 5 January 2026 (UTC)
- That was actually another poster on the thread not me, I used the direct links to wikimedia Bbbub (talk) 07:49, 6 January 2026 (UTC)
- I'm the other poster. Perhaps ironically, thumb.php was an unideal workaround I figured out. upload.wikimedia.org would return 429s while thumb.php would not. ~Kevin Payravi (talk) 08:21, 6 January 2026 (UTC)
- That was actually another poster on the thread not me, I used the direct links to wikimedia Bbbub (talk) 07:49, 6 January 2026 (UTC)
Chiming in as another external developer who ran into this: hotlinked images loaded clientside (in-browser) were getting 429ed, even in situations where I was only loading a few images. I realized that my webapp was not sending in the Referrer header when requesting hotlinked images. After restoring the Referrer header, I could load thumbnails just fine. So I'm guessing the lack of the Referrer header was one heuristic that (combined with others) resulted in the 429 errors. More details on the Phab thread. ~Kevin Payravi (talk) 08:21, 6 January 2026 (UTC)
File:PION Labs logo.svg
[edit]
There is some issue with File:PION Labs logo.svg. Don't know how to fix it. -- Geagea (talk) 11:25, 5 January 2026 (UTC)
- The problem is that it is not an SVG, it's a PNG image that has been put inside of an SVG. It should probably be deleted, or someone has to vectorize it properly. —TheDJ (talk • contribs) 12:40, 5 January 2026 (UTC)
- Thanks, deleted it and upload png file - File:PION Labs logo.png. -- Geagea (talk) 13:28, 5 January 2026 (UTC)
- It would probably be good to somehow get a list of such files and then convert them all to PNGs. For example SVG Translate doesn't work on these. Apparently as this example shows one can redirect the SVGs to PNGs (so that links to them don't break). May not be worth the effort for now. Nevertheless, maybe at least a warning note template including a category could be added to these files if there's a way to scan all the SVG files for these. Prototyperspective (talk) 23:49, 5 January 2026 (UTC)
Showing the approximate location as text, not just geocoordinates in file description
[edit]For example in this file File:White cabbage butterflies flying.webm, the user added "Franklin County Ohio, USA" below the template. The same has been done for many of the other videos by the user except the most recent as well as by many other users. Worse, for many other videos there is no textual name of the region at all and just the geocoordinates which are unreadable – people don't know which approximate location such as which country it is just by a text like 40° 02′ 38.4″ N, 83° 02′ 31.2″ W.
The related effort seems to be Commons:Reverse geocoding but that's (so far) only adding data to the structured data and the categories, not to the content of the file information template such as the {{Location}} template.
Is there a way to automatically parse the region location from the geocoordinates and then add that next to next to the {{Location}} template (probably by a bot)? For the files where geolocation structured data has been written, I think that SD could be used to add that info to the file description box, maybe into a new parameter of Template:Location like |name= that has the location in text string format. Would be great if somebody could add this info to the files' Information template.
Prior discussion is at Template talk:Location/2024#Please allow adding text for location and/or parse that from the geolocation (archived). Prototyperspective (talk) 19:25, 7 January 2026 (UTC)
- I always do this with categories, viz Category:Videos from Franklin County, Ohio and Category:Insects of Franklin County, Ohio and often add words to the description. I don't know of an automated way to do it. Jim.henderson (talk) 19:40, 7 January 2026 (UTC)
- I do this too but not every user knows of and looks at the categories which for >99.9% of visitors are either at the bottom (many don't scroll to there) or, if on mobile, not visible at all.
- Secondly, many videos are left out by this – e.g. quite many videos of that user who uploaded the example video but also many more. And it doesn't scale well and even if it did, it would be better to automate this more so that more contributor time is freed up and less videos without the region as text. Moreover, often the location is not really key to a video because it doesn't show the location and otherwise is unlikely of interest to people browsing the category for a region like Franklin County, Ohio so people don't add the category or if they add it, it's then causing the problem of cluttering a category with videos that aren't really of interest to the user. (For example a screencast video of some software may have been produced in a certain place but it's not related much to that place and shows nothing of the place; likewise a microscopic video of an animal under the microscope could have been taken somewhere but it's also not really about the place.) Prototyperspective (talk) 22:46, 7 January 2026 (UTC)
How to see why a file is somewhere underneath a category?
[edit]
How to see why for example this photo of a stone is underneath Category:World statistics (shown in deepcategory:"World_statistics") or this photo of a fish in in Category:Food statistics (shown here)?
Prior discussion here. Dschwen eventually told me of a way to see the source of categorization (example on the right) but it doesn't work anymore, probably because FastCCI is down (it usually is). This should load the cat-path but doesn't: https://commons.wikimedia.org/wiki/File:Rapala_fishing_plug_SSR_9_made_in_Finland.jpg?fastcci_from=118244057
This functionality really is needed to fix miscategorizations and make categories more useful. Is there maybe some hacky way using petscan or sth like that? Prototyperspective (talk) 01:26, 8 January 2026 (UTC)
