Jump to content

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

Community opportunity
From Meta, a Wikimedia project coordination wiki

View all wishes.

Description
FastCCI being used to see categorization path of a nonmicroscopic image in the Microscopic images category
FastCCI Commons gadget showing why a quality image is erroneously categorized into a category; a separate gadget/functionality that does this is proposed here
Deepcategory search / view-mode on Wikimedia Commons showing offtopic results for category "Environmental diagrams"
Example of a broad category that was largely fixed so that it doesn't contain offtopic images (Microscopic images relating to biology)

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

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.

Assigned focus area

Unassigned

Type of wish
Feature request
Tags
Affected users

Commons users

Other details
Voting

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

Supporters of this wish
Support AlphaLemur (talk) 03:30, 5 December 2025
Support Sailko (talk) 16:54, 5 December 2025