A way to see why a file is somewhere underneath a specific category (tool to show cat-path) (Community Wishlist/W393)




On Commons, many categories, especially the higher-order large ones, have many off-topic files within their category branch. That usually is because of some miscategorization where somewhere far down in its subcategories, a category was included that isn't really about the subject of the parent category.
With the deepcategory search operator, one can see files of a category, including files in all its subcategories. This often shows many offtopic files due to the issue explained above, as can be seen in the first image on the right (another example are diagrams and normal photographs underneath the c:Category:Microscopic images which is supposed to be for microscopy photos only). Here you can see the results for deepcat:Microscopic images (also showing nonmicroscopic images) and deepcat:Diagrams (also showing charts and photos that are not diagrams).
Fixing up categories and removing offtopic files is currently really difficult though. That is because the file could be included in the search results because it's in some subcategory 10 levels away from the category one has used deepcategory with. So for example if one uses the search deepcategory:"Buildings" in MediaSearch and there is some microscopic image of a virus in the image results, one can't find out why it's there. One has to go to the file page and look at the file's categories and navigate upward on the category one thinks is the likely culprit and this often doesn't work and generally takes way too much time. For example it could be Buildings->Buildings by function->Agricultural buildings->[10 more levels]->Veterinary virology.
What is needed is a tool or functionality that shows the categorization path of the file to the parent category so that one can spot the faulty categorization and fix it. This is in fact already possible with the FastCCI tool but that tool usually doesn't load (phab:T367652). This feature would also be useful when images that shouldn't be there show up in a petscan where one can intersect Commons categories. Issue 182 about it at petscan.
Not having this feature greatly limits the usefulness of categories on Commons which can hardly be refined so that they really only show files about the category subject and impedes searching them using deepcategory as well as viewing categories with a modern scrollable wall-of-text view instead of having to navigate many subcategories in which files are dispersed.
What is proposed here is already possible via the FastCCI Gadget. However, that gadget is down/dysfunctional most of the time and one doesn't have any UI like input boxes to get the path but one must manually open the file (it can't show the path on the search results page directly) and append a parameter to the URL. That parameter is the category ID which can be found via Tools -> Page information on the category. It's 39217 and 27549 for these two categories. Examples (I won't fix these so the path remains visible when you click the link): https://commons.wikimedia.org/wiki/File:Alouatta_seniculus_5perspective.jpg?fastcci_from=39217 https://commons.wikimedia.org/wiki/File:Strada_europea_29.svg?fastcci_from=27549 However, apparently FastCCI is already down again. So right now these links don't work. I hope that some MediaWiki developer (likely a volunteer, not WMF) looks at the FastCCI code c:MediaWiki:Gadget-fastcci.js#L-1170 and implements this in some separate tool/gadget. I suggested what I'm proposing here also on the tool's talk page here.
Examples
- this petscan scan shows many image files as being in the Videos cat
- this petscan scan shows files that are not science fiction films
- this scan shows several files that are not comedy like this or this
- Charts like c:File:Life expectancy in Albania.svg are in c:Category:Maps of the world as this scan shows, which may be because Category:Demographics of the European Union is falsely in the category tree of Category:Maps of the European Union, and second Category:Maps of Afro-Eurasia is falsely in Category:Maps of the world indicating regions
- Why is this video of the ISS somewhere in the "Fantasy art" cat? Scan: Fantasy_art + Videos by file format
- Why is this 3D STL file in the Videos by file format cat (same scan as above)?
- Why are there these many unrelated files in Audio files of music + Hip hop music (glamorous, another tool, showed e.g. this file which doesn't belong there
- Why are these unrelated files in Dark wave (music genre)?
By the way this would also be useful to display the source of categorization for seeing how the file relates to the selected category (which is usually specified in the chain of category names).
Somebody please enable showing a category path beneath each item in the thumbnail view (and a button per item in the normal table view). It would be best as a native functionality but a gadget would help a lot too and maybe could later be turned into a native feature.
It could improve data quality a lot and fix many categorization problems that otherwise would be very difficult/unlikely to find.
Unassigned
Commons users
- Created: 18:38, 7 June 2025
- Last updated: 13:13, 10 October 2025
- Author: Prototyperspective (talk)
This wish currently has 2 supporters. Voting for this wish is open until it is completed.