Rich Link Previews support for location share links

When sharing location on map via HTTP link, it would be useful if it supported Rich Link Previews for messengers like Telegram or so.

Right now, OSM links look like this, they are static and non-informative:

Compare it with what Google Maps links look like:

Rich Link Preview is a matter of adding few <meta> tags in the <head> of the web page:

Could adding them for the OSM location share links be requested?

4 Likes

The URL that you gave (OpenStreetMap) already has Open Graph tags:

<meta property="og:site_name" content="OpenStreetMap">
<meta property="og:title" content="OpenStreetMap">
<meta property="og:type" content="website">
<meta property="og:image" content="https://www.openstreetmap.org/assets/osm_logo_256-ed028f90468224a272961c380ecee0cfb73b8048b34f4b4b204b7f0d1097875d.png">
<meta property="og:image:secure_url" content="https://www.openstreetmap.org/assets/osm_logo_256-ed028f90468224a272961c380ecee0cfb73b8048b34f4b4b204b7f0d1097875d.png">
<meta property="og:url" content="https://www.openstreetmap.org/">
<meta property="og:description" content="OpenStreetMap is a map of the world, created by people like you and free to use under an open license.">

There are a number of tickets open in the issue tracker about improving them but I don’t think there are any very concrete (and workable) suggestions yet.

Was there something in particular that you wanted improving?

2 Likes

Hilariously this site has actually used the OG tags to automatically generate text for that link!

These images are just a logo, but should be actual map data instead:

2 Likes

That would be Improve Open Graph previews · Issue #2965 · openstreetmap/openstreetmap-website · GitHub then which also has a lot of discussions about the technical issues that need to be resolved to make it possible - principally that we need a static map service that can serve (and cache) static maps of arbitrary areas.

In itself creating that won’t be hard but stopped it being abused will be much harder.

7 Likes