Jump to content

Script/tool to add Commons category links to articles (Community Wishlist/W445)

Community opportunity
From Meta, a Wikimedia project coordination wiki

View all wishes.

Description

I created many new categories on Wikimedia Commons. I noticed that even years after I created the categories and even when they're full of interesting high-quality media, the English Wikipedia article as well as the ones of the other languages don't contain a link to the category anywhere.

Commons categories often are very useful for readers because many articles can't possibly include all the useful media files directly in them so there's some the user may find interesting or educational or otherwise useful that are only in the Commons category. There, there may also be some further subcategorization of the files that enables narrowing down what kind of file one may be looking for and one can also just browse it discovery style and see what's there (some say images say more than thousand words).

The link to the Commons category is usually done via the w:Template:Commons category.

  • There are probably many thousands of articles without the Commons category link but more files than used directly in the article.
  • Please create a script that enables and if possible also does the addition of that Commons category template. This would probably be a volunteer effort, not something for WMF.
  • It could for example exclude categories where all the files it contains are already used in the article or if the category only contains ≤ 1 file.

The template is usually placed beneath the References section. This means most readers will never see it, especially if the References section is long which is often the case. It's basically shooting in one's own foot by making sure many people will never learn about and visit Commons. However, adding it instead to the See also section instead was also discussed and has also been done for many articles. If it becomes standard practice to add the template more visibly to the See also section instead of the bottom of the article – if that section doesn't exist it could for example be created – then the template should probably be moved up from the "External links" section across many articles by some bot / script so for this wish it doesn't matter so much where the template is added initially.

Assigned focus area
Type of wish
Feature request
Tags
Affected users

Wikipedia readers looking for more media like more charts about the subject

Other details
Voting

This wish currently has 4 supporters. Voting for this wish is open until it is completed.

Supporters of this wish
Support Prototyperspective (talk) 16:55, 17 October 2025
Support Pppery (talk) 16:22, 24 October 2025
Support I have at the top of each page a link to the View It! page for the associated Wikidata entry. This seems to show images from the associated Commons category, but not subcategories, and there's no direct way to see the Commons category/subcategories. Perhaps this tool could be enhanced? Eiim (talk) 14:21, 5 November 2025
Support Partial support: I'd support a tool to make it easier for humans to add this template to Wikipedia articles, including an easy way to glance at the content of the Commons category and make sure it is worth linking. I'd oppose attempting to completely automate the task, because I think it requires human judgement in order to be a net asset. Also, I'd note that it is likely that this is a tool that could be developed by a single person, and might be better taken up by a volunteer or assigned to a contractor than using WMF developer resources. Jmabel (talk) 06:08, 5 December 2025