opengisch / QField-docs

Documentation for the QField ecosystem
https://docs.qfield.org
Creative Commons Attribution Share Alike 4.0 International
37 stars 75 forks source link

Image is not shown when a link is pasted to social media #353

Closed JinIgarashi closed 1 year ago

JinIgarashi commented 1 year ago

Paste a link like “ https://docs.qfield.org/ja/success-stories/rwanda-rural-water/” to social media.

now a card is shown, but image is still not shown. Maybe og:image setting has problems.

also, description is not shown.

image
m-kuhn commented 1 year ago

image

Maybe we need /assets instead of assets?

JinIgarashi commented 1 year ago

image

I just tested in whatsapp, it’s shown well.

JinIgarashi commented 1 year ago

Maybe we need /assets instead of assets?

That could be the reason. Not sure

JinIgarashi commented 1 year ago

Maybe we need a specific image for the link. See the below spec. I put svg link. And twitter doesn’t support svg for it

https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/summary-card-with-large-image

A URL to a unique image representing the content of the page. You should not use a generic image such as your website logo, author photo, or other image that spans multiple pages. Images for this Card support an aspect ratio of 2:1 with minimum dimensions of 300x157 or maximum of 4096x4096 pixels. Images must be less than 5MB in size. JPG, PNG, WEBP and GIF formats are supported. Only the first frame of an animated GIF will be used. SVG is not supported.

also we may need twitter:description as well.

@m-kuhn could you make a nice image for meta tag?

JinIgarashi commented 1 year ago

@m-kuhn Maybe we should try this MkDocs plug-in for social image.

https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/

m-kuhn commented 1 year ago

qfield_logo

Converted the svg to png using inkscape, you could copy that to documentation/assets/images

JinIgarashi commented 1 year ago

thanks, but I think I found a solution with social plugin. It can generate quite nice images dynamically. check #354