Open Graph hints
This is the absolute minimum to get started and avoid mistakes (that I made). But there is more!
Minimal markup:
<meta property="og:title" content="page title"><meta property="og:description" content="short page description"><meta property="og:image" content="https://joriszwart.nl/me2019.jpg"><meta property="og:url" content="https://joriszwart.nl/articles/opengraph">
Adapt to your own needs, ofcourse :-)
If you leave out og:image a random image from the page will be used. Not necessarily what you want.
Markup notes
- All URLs must be absolute
- When used on the frontpage, the URL should include a trailing slash
Image dimensions
- Minimum size: 1200×630 pixels
- Optimal size: 1920×1080 pixels
- Supported formats are JPEG, PNG and WEBP1
Be aware of cropping!
Debug / Refresh cache
So, if you did make a mistake:
Facebook Sharing Debugger: developers.facebook.com/tools/debug.
LinkedIn Post Inspector: linkedin.com/post-inspector.
-
Some (Facebook, not Linkedin) can handle SVG, but make sure they have a big enough
width×heightand/orviewBoxor they rasterize an ugly low resolution version. ↩︎