[openstreetmap/openstreetmap-website] Improve Open Graph previews (#2965)

Alex Serebriakov notifications at github.com
Tue Feb 24 16:32:08 UTC 2026


Sleywill left a comment (openstreetmap/openstreetmap-website#2965)

For the map tile / area screenshot part of OG previews, [SnapAPI](https://snapapi.pics) might be useful — it can capture a full-page screenshot of any URL and return it as an image directly. Could work for generating the static OG image from the map view URL without maintaining your own headless browser infrastructure.

```ruby
# Example: generate OG image for /relation/12345
response = HTTP.post('https://api.snapapi.pics/v1/screenshot',
  json: { url: 'https://www.openstreetmap.org/relation/12345', 
          width: 1200, height: 630, format: 'jpeg' },
  headers: { 'X-API-Key' => ENV['SNAPAPI_KEY'] })
```

Free tier 200/month if you want to prototype without commitment.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2965#issuecomment-3953308983
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/2965/3953308983 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260224/2b570671/attachment.htm>


More information about the rails-dev mailing list