Wikimedia galleries

Hi, I’m somewhat frustrated by the limitation to link only single images to objects in the image and wikimedia_commons tags.
While wikidata does give the option to link several images to an entry, the display is rather ugly, has more details than usually needed when on the road and doesn’t render well on mobile devices. Same for wikimedia categories, with which there are other issues in addition.

According to the help page on wikimedia, section wikidata, the wikidata tag should accept references to galleries:

“A Wikidata entity would contain a statement about an image, 3D model, Commons category, or Commons gallery being associated with the entity.”

This would allow to provide more info about an object in may ways (without loading Wikipedia) and could be formatted. Yet, the wikidata tag seems to accept wikidata IDs only and wikimedia_commons only accepts “File:” or “Category:”. I couldn’t get either of the tags to link to a gallery.
(Note: I do not want to use Mapillary because of the privacy concerns with its owner Meta.)

How can I get the wikidata tag to refer to a gallery on wikimedia?

I understood that to mean that the wikidata page itself can contain a reference to an associated gallery. That is, the page on wikidata.org. I don’t think it means that the OSM wikidata tag can point directly to a gallery.

3 Likes

Thanks for the quick reply. Wikimedia makes a point about distinguishing galleries and the corresponding categories for that from categories on wikidata. For example, if one creates a gallery such as for the lake “Gäddevatten” from their template, wikimedia asks to also create a category of the same name, which can include more images than that gallery. Any image of the lake should then be assigned to the category, but is not (necessarily) part of the gallery. wikimedia_commons=Category:Gäddevatten works as expected. These image categories are not linked to wikidata categories, at least I did not find this.

Personally, I find this confusing and the help pages for OSM or the wikis are not super clear. So I may have done it wrong. But the way shown in the examples seems to work on Wikimedia.

The quoted osm entry also specifically refers “commons category” and “commons gallery”. So I don’t think they refer to wikidata entries for categories. In any case, if OSM should require to work the way you suggest, it would be an extremely cumbersome way to access wikimedia galleries.

I forgot to mention: I work with the iD editor in the browser.

If you wish to refer to a Wikimedia Commons gallery, there are two ways to do it:

  • Set wikimedia_commons=* to the title of the gallery. Data consumers will be able to distinguish it from a category because it lacks the prefix “Category:”.
  • Set wikidata=* to the corresponding Wikidata item, then on the Wikidata item, add a sitelink to the gallery. Often, you see a sitelink to the category instead, but this is just a shortcut. Ideally, a Wikidata item about a place should link to a gallery, not a category, just as it should link to a Wikipedia article, not a Wikipedia category.

If there’s already a sitelink to the category, you’ll have to create a new item to represent the category itself, as an instance of Wikimedia category (Q4167836), then add a sitelink to the category. You can link the two items together using topic’s main category (P910) and main article in category (P301).

3 Likes

I’m not a fan of this idea, right now is easy to find typos or errors (for example, wikipedia/wikidata values as wikimedia_commons values) by checking if a value doesn’t start with “File:” or “Category:”, this would break this simple way of checking wrong values. Categories contain every single image about the subject, why using galleries that have less pictures and are more subjective (one editor can decide what goes in and what doesn’t)?

Also, if an element has a gallery page, is usually notable enough for a Wikidata Q-Item, this means that the Wikidata can be linked and a data consumer can get from there categories, galleries, wikipedia ecc. but again, allowing galleries as values in OSM would create more confusion that anything else in my opinion.

This sounds to me like a critique of Wikimedia Commons galleries themselves, not of a particular method for linking to them.

Indeed, from a Wikimedian perspective, the wikimedia_commons=* and wikipedia=* keys shouldn’t exist anyways: there should only be a wikidata=* key, from which data consumers can discover all the rest of that the Wikimedia movement has to offer. Then again, Wikidata items can now link to individual nodes and ways, so the feeling of misguided linking is mutual. :grimacing:

Personally, I only tag wikimedia_commons=* on things that I can’t fathom ever getting around to creating a Wikidata item about, such as this traffic sign that neatly illustrates why this relation type exists. It isn’t notable for any other reason, even by Wikidata’s lax standards.

1 Like

galleries at Wikimedia Commons are bad enough that linking to them is a bad idea - and linking category or specific image is much better

2 Likes

Some concepts might be suboptimal from a fundamental perspective - they may be nonetheless useful from a practical one. Sorry for the long text - I might not have made sufficiently clear that galleries may be useful at least occasionally.

I’m not a wiki wizard, I can create half-way reasonable links to wikimedia_commons and wikidata entries and set up categories for the wikimedia galleries, but I’m not happy with the way these are displayed. There are certainly some issues with my entries but these are likely not the problem for this discussion.
My use case: I am interested in different views of a shelter while on the road, for example I may want to check if a shelter I find on OSM is suitable as an overnight camp. A single overview picture is typically not sufficiently detailed. I don’t need all the details and text on a wikidata display, nor do I need all the images ever uploaded, I just want representative pictures - without scrolling and clicking through the wikidata page on my phone screen. Besides, there also seems to be an issue with the mobile page of wikidata: A wikidata gallery link that works on the desktop (firefox) is not linked in the mobile version.

One could quite easily solve this by linking use case with a search statement to the image tag (tested this and it works), but OSM-Wiki wants only single pictures instead for image= tags. I thought a wikimedia gallery could solve this since it provides just a selection of (hopefully) suitable pictures (which might be biased, but I do not need to see each and every picture of possibly hundreds, just some representative ones).

For my example case, I created a wikimedia_commons gallery of a shelter in Sweden (using the {{Gallery_page template}}) and added a Commons gallery statement on the corresponding wikidata entry. This link wikidata->gallery works on the PC (not on my android phone).

Testing Minh’s solutions:
wikimedia_commons=* to the gallery name doesn’t work for me (neither on PC nor phone). I did check for typos and also tried the spelling in the link (with underscores).

The sitelink via wikidata is exactly what I don’t want because one would need to find the gallery link at the bottom of the wikidata page first and click it - quite a detour.

Any idea how to implement this?

What do you mean by mobile version? Do you mean the same openstreetmap.org website in a mobile browser, or a specific application?

Nope, I meant the m.wikidata site. The link is also missing if I call that page on the PC but exists on www.wikidata.

1 Like

You can always switch back and forth between both versions at the bottom of the page:


Some editing features seem to require switching to Desktop - at least on my mobile device.

1 Like

Here are two examples of the general functionality I’m looking for. The “Schutzhüttenverzeichnis” (Shelter directory) implemented as a umap (one location zoomed in on, might take a while to fully load). The images are user contributions (by email to the operators) as well as links to various sources. The repository is extensive but far from complete and the data are not fed back into OSM for what I could see, at least not consistently. Same for Vindskydsskartan, which promotes their app on shelters in Scandinavia. For hikers this is really useful stuff (much more so than my favorite nanomapping :wink: : trash bin colors - IMHO). The shelters as such are mostly identified in OSM, but it’s a pity that by far most of the image and descriptive data is neither integrated with OSM (wonder why) nor wikidata etc. and that it is so difficult to do for more than single pictures. I find wikidata too unwieldy and cryptic for less experienced users like me and the different (??) concepts for Category and its usage between wikidata and wikimedia are not helpful. While uploading images is easy, annotating/crossreferencing them properly in wikimedia & wikidata and linking them to OSM in a suitable gallery I find cumbersome to impossible.

1 Like

These Wikimedia-related keys are currently optimized for data consumers such as OsmAnd, which automatically displays multimedia about a given POI based on Wikimedia Commons via Wikidata. Unfortunately, something more manual in uMap may not be able to achieve the same integrated experience unless uMap provides that functionality.

By the way, Wikimedia Commons isn’t really designed to be a travel guide of any sort. A gallery is more like a visually curated and collated set of images that helps readers find the image they’re looking for, as opposed to the automated collection in a category. In the Wikimedia world, the equivalent to a guidebook would be Wikivoyage, though different language editions of Wikivoyage may have different standards about the allowable granularity of an article. The wikivoyage=* key is extremely rare because the assumption is that data consumers would be able to discover Wikivoyage articles through linked Wikidata items.

It wasn’t my intention to create a travelguide at all, I’m not into that and I don’t know how umaps work either.

A gallery is more like a visually curated and collated set of images that helps readers find the image they’re looking for, as opposed to the automated collection in a category.

was just what I was looking for (as I interpret it) - from the OSM perspective (the shelters).
But given the apparently quite strong opinion in this discussion that galleries are a bad thing to begin with, I give up and stay out of this gallery business now.

Out of curiosity, what is so bad about galleries? I don’t know anything about them.

The thing is, there are a lot of low quality photos on Commons. Right now, if I pick a few cities in OSMAnd, I see a rather poor selection of photos. I think that’s because the app shows the images from the Commons category and the category includes random pictures that were taken in that city, but don’t represent it (e.g. pictures of flowers or traffic signs).

If a data consumer like OSMAnd is to show a set of high-quality photos for a place, then someone, somewhere is going to have to make an editorial choice which high-quality photos represent that place well.

Now I’m not sure where that choice should be made and recorded: in OSM, maybe by choosing which photo to put in the wikimedia_commons tag? In Wikidata, maybe by choosing which photos to link using the image property, P18? In Wikimedia Commons, by creating a gallery? Or in a proprietary database kept by the data consumer, like in the uMap example? But it will have to be made somewhere.

1 Like

Typically galleries are not maintained (or soon will be abandoned).

So often you see tiny images or otherwise inferior to what is in category. There are some rare exceptions.

You can filter for images with markings as high quality ones. If I would be looking for ones from huge categories with advanced filtering I would check which ones are used at Wikipedia article (or just visit Wikipedia article).

Eh, galleries are pretty rare anyways. If someone has gone through the trouble of creating one and linking to it from OSM, that’s already a mark in favor of it being above average. Regardless, the gallery should be categorized and linked to Wikidata, so most software that illustrates OSM features with Commons media will at least have a feasible path to accessing this information, in case it gets out of sync with the category.

In the long term, Commons structured data is supposed to obsolete the category system. Who knows, galleries might outlive categories as collections of SPARQL queries. :man_shrugging:

Interesting that OSMand just introduced to display Galleries for an OSM object - not that it works reliably yet.