[openstreetmap/openstreetmap-website] Wikidata preview should request images with a fixed height (Issue #7027)
1012ayush
notifications at github.com
Wed Sep 9 06:27:52 UTC 2026
1012ayush left a comment (openstreetmap/openstreetmap-website#7027)
Hi @1ec5, I would like to work on this issue.
My plan is to replace the Special:Redirect <img> src logic in app/assets/javascripts/index/element.js with an asynchronous fetch call that queries the Wikimedia Commons Action API (requesting action=query&prop=imageinfo&iiprop=url&iiurlheight=32).
I'll parse the JSON response to extract the exact 32px-height thumbnail URL and update the element's source dynamically.
As part of this change, I will also remove the ?mobileaction=toggle_view_desktop workaround introduced in #6202, since fetching the direct image URL via the API avoids the mobile HTTP redirect and CSP issues entirely.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/7027#issuecomment-5597037489
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/7027/5597037489 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260908/4ae21bd4/attachment.htm>
More information about the rails-dev
mailing list