I think this is because Mapillary does not follow the https://oembed.com/ specification, e.g. no preview image can be loaded by the Discourse server.
I’ll ask the team what we might need to do to get this to work!
@habi @mariotomo as far as we can tell, Meta/Mapillary has everything needed. So it should work on Discord but it’s not clear why:
Meta tags are here: HEY META - Website Meta Tag Check
… so, where’s the ball now? can I do something to put it back to rolling?
I see at least in the preview an image embedded
I use this link:
https://www.mapillary.com/app/?lat=18.785124499999995&lng=98.99314630000003&z=17&pKey=204383767969703
which results in this preview box having the small version of the image visible.
Is this the missing preview? Then it works for me…
let me see …
or does one need the whole link, not just the pKey?
no, it works just fine, just the pKey, then wait a bit until you get the miniature.
would it be possible, a just slightly larger miniature? possibly through an extra parameter besides the pKey, like width or height?
and what must we do, to get the preview in an old message? re-editing it?
re-editing helped. a larger picture would be nice.
I guess this should be possible. The image link in the meta header is this:
<meta name="og:image" content="https://scontent.ffra1-1.fna.fbcdn.net/m1/v/t6/An-8E3Rj9NjUSg83IO89mifvraL4Wjc3lzAnxf5KUz3XSG8HL0IBkfvQCFLYoECR-4F1nY2AbQFLjzssbRUx5U3vMG4PbYRgZyEShfXU4-Lz_Yf4OU9JE_NSmUZJzsVUiAT2mVNJQ02zXNLG9oTbjw?stp=s1024x576&ccb=10-5&oh=00_AT_5ihVTfFZB0gKVQ_wAoS5QE7EVU8jFWtFMizygABnn9Q&oe=631CD3AE&_nc_sid=122ab1">
This will load a 1024x576 pixel version of the image.
The relevant code to create it is IMHO this:
GitHub search does not show me any related location where the image_height property is set. Maybe someone more familiar with Ruby and the code can have a closer look.I guess there is a location where it is capped. Also somewhere must be code which transferred the resized preview image to the uploads folder of discourse.
Maybe a better way for us would be to create a specific onebox handler for mapillary and not use the generic handler. That way you have more control over the final layout.