Forum Discussion
Link Web Part Not Generating Preview
Here is the code for a trivial Web Page I am hosting in IIS on a Non-SharePoint machine:
<!DOCTYPE html>
<!-- Saw this in the source at https://techcommunity.microsoft.com/t5/Microsoft-SharePoint-Blog/Files-restore-for-SharePoint-and-Microsoft-Teams/ba-p/480760 -->
<html prefix="og: http://ogp.me/ns#" dir="ltr" lang="en" class="no-js">
<head>
<title>Testing URL Preview 2</title>
<!-- Saw these meta tags on CodeShow a long time ago
http://codeshow.codeplex.com/ -->
<meta name="keywords" content="URL Preview Test Two" />
<meta name="description" content="Trying to figure out why URL Preview works inconsistently." />
<meta name="author" content="Shawn Eary" />
<meta name="dateCreated" content="06/25/2019" />
<meta name="copyright" content="(c) ©2019 - University of Arkansas (Test Site)" />
<!-- https://blog.0day.rocks/link-previews-in-im-apps-and-privacy-d32e6056095b -->
<meta property='og:title' content='URL Preview Test Three' />
<meta property='og:site_name' content='Test' />
<meta property='og:image' content="https://brand.uark.edu/_resources/images/downloads/facebook-images/RS47083_FacebookCovers15.jpg" />
<meta property='og:type' content="article" />
<meta property="og:description" content="Why doesn't URL Preview Work consistently?" />
</head>
<body>
This is a test page.
</body>
</html>
When I the type the URL for that Web Page into a Link WebPart on SharePoint Online, I get this "error":
"There's no preview available for this link."
What do I need to change in the above code, to get the Link Web Part of SharePoint Online to display a preview?
It seems like a bug - especially considering that the Use the Link web part page shows a preview image to an external site.
I'll report it to MS Support and report back.
Norm
15 Replies
- Shawn EaryBrass Contributor
BTW: I know this is off topic, but it would be nice if this forum:
- Allowed me to edit my posts
- Would pretty format my code
- Shawn EaryBrass Contributor
I'm still having problems with this. As an example, if I post this URL in MS Teams:
https://www.microsoft.com/en-us/microsoft-365/blog/I get a URL Preview:
but when I try to put the same URL in the Link WebPart of a SharePoint Online page, I get a "There's no preview available for this link." message:- DJ GRIJALVACopper Contributor
Shawn Eary Having the same issue, but it shows the preview on some SharePoint sites and not on others for the same exact link.