You can add the opengraph tag like below:
<meta property="og:image" content="
`http://example.com/image.jpg">`
Open graph thumbnail previews for urls get cut off
When posting a url in teams, we get shown a thumbnail preview of the website's opengraph tag for image. However the thumbnail preview has it's sides cut off.
There is a weird cropping that is happening.
The standard recommendation for websites for open graph image is 1200 x 630, so most website previews will have this problem.
Here is a screenshot of Microsoft Learn's preview when posted:
As we can see, in the thumbnail, the gray sides of the microsoft logo is cropped away.
My question is, how should an external website set their opengraph image tags so that their images are rendered fully in their entirety on thumbnail previews in MS Teams chats?
4 answers
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more
-
Nivedipa-MSFT 3,166 Reputation points Microsoft Vendor
2024-08-16T15:25:39.4066667+00:00 -
Fayaz Sunte 0 Reputation points
2024-08-18T22:13:50.3933333+00:00 When posting a url in teams, we get