Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the way IHM-uploaded images are tagged in OSM #2004

Open
zstadler opened this issue May 28, 2024 · 4 comments
Open

Change the way IHM-uploaded images are tagged in OSM #2004

zstadler opened this issue May 28, 2024 · 4 comments
Labels
enhancement Medium Should be added/fixed in the future

Comments

@zstadler
Copy link
Member

What is the problem this feature will solve?

Currently, IHM-uploaded images have a hard-coded full URL in the OSM image* tags. This requires IHM software to find an use that URL given the image name that was uploaded to Wikimedia commons

What is the feature you are proposing to solve the problem?

According to the OSM Wiki on Photo linking, there is another way to link to Wikimedia Commons image - the wikimedia_commons key.
For example: wikimedia_commons=File:Eiffelturm.JPG.
When there are several images, a Wikimedia Commons Category can be used: wikimedia_commons=Category:Eiffel Tower

Access to the image can be done using hotlinking based on the file name. For example:
https://commons.wikimedia.org/w/index.php?title=Special:Redirect/file/Eiffelturm.JPG
https://commons.wikimedia.org/w/index.php?title=Special:Redirect/file/Eiffelturm.JPG&width=300

What alternatives have you considered or tried?

Keep the system as-is

Additional information

No response

@zstadler zstadler added enhancement Medium Should be added/fixed in the future labels May 28, 2024
@HarelM
Copy link
Member

HarelM commented May 28, 2024

When there are several images, a Wikimedia Commons Category can be used: wikimedia_commons=Category:Eiffel Tower

Who will create these categories? What happens to places that don't have a name?

Besides the above, there's a need to open a bulk edit announcement in the OSM forum.

I'm good with this idea as long as we solve the above issues.

@zstadler
Copy link
Member Author

Who will create these categories?

If we can do that through the API, and if it would simplify the handling of multiple images, we may create the categories ourselves. BTW, there is already a Category:Israel Hiking Map

What happens to places that don't have a name?

I believe there is already a mechanism that sets the image names. That need not change.
For example: File: IHM Cave*

Besides the above, there's a need to open a bulk edit announcement in the OSM forum.

IMHO, this is optional, assuming we will want to continue and use image* tags that were or will be added to OSM by means other than IHM.

@HarelM
Copy link
Member

HarelM commented May 28, 2024

This is already supported for image*=File:xxx.png as can be seen here:

return `https://commons.wikimedia.org/w/index.php?title=Special:Redirect/file/${imageUrl.replace("File:", "")}&width=${size}`;

We use it for image caching here too:
fullImage = $"https://commons.wikimedia.org/w/index.php?title=Special:Redirect/file/{imageUrl.Replace("File:", "")}";

There is currently no support for wikimedia_commons though...

In theory, we may remove the code that translates the file name to an image url here:

public async Task<string> GetImageUrl(string pageName)

and store the image in the wikimedia_commons tag, but if we plan to support both the "old" image tag and the new wikimedi_commons then this will only complicate the code without a significant improvement, so I'm not sure I understand the motivation behind this issue...

Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale label Aug 27, 2024
@github-actions github-actions bot closed this as completed Sep 3, 2024
@HarelM HarelM reopened this Sep 3, 2024
@HarelM HarelM removed the stale label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Medium Should be added/fixed in the future
Projects
None yet
Development

No branches or pull requests

2 participants