I published a website (https://isugg20-crash-viz.netlify.app/#1) using Netlify and was wondering how I can add an image that will serve as my website’s social media preview when I share it on Facebook, LinkedIn, etc?
Asked
Active
Viewed 270 times
0
-
1You have to add `` tags specific to each social media site inside the `` of your HTML. It's nothing special to do with Netlify. Just google social media meta tags, you will find free tools to generate them for you easily. – GirkovArpa Sep 20 '20 at 02:10
-
@GirkovArpa, thanks for the pointer! From Google search I found https://metatags.io/ and generated the meta tags. But even after adding the meta tags, I don't see a preview when I try sharing the website link on Facebook or LinkedIn. Is it because it takes a while for these meta tags to get registered in Netlify's system? – Ashirwad Sep 20 '20 at 02:54
-
The meta tags are present as you can see in the source code of your site, and working according to this: https://www.heymeta.com/url/isugg20-crash-viz.netlify.app – GirkovArpa Sep 20 '20 at 03:00
-
Huh, interesting! But when I try to share the link on say Facebook, the preview looks very different! It's pulling one of the images from the slides and using that as a preview image. Do you know what might be causing this issue? – Ashirwad Sep 20 '20 at 03:10
-
According to here: https://stackoverflow.com/a/20262825/13378247 You were right about Facebook caching the old site. So I recommend changing the Netlify URL of your site. It's very easy and takes only a second. If that doesn't help, maybe any of the numerous other answers can. – GirkovArpa Sep 20 '20 at 03:48
-
When I use Facebook's option *See exactly what our scraper sees for your URL*, it seems Netlify is not injecting the meta tags. But Hey Meta is able to read those tags. I don't know what's happening! I have communicated this to Netlify, hope I hear back from them soon. – Ashirwad Sep 20 '20 at 04:35
-
Right-click on your page (while viewing it) and click "View Source". You'll see the tags. They're definitely there. – GirkovArpa Sep 20 '20 at 04:43
-
1Yeah, you are right, the tags are there! I am getting baffled now. I tried sharing the link on LinkedIn also, but I don't see the social preview like I see on Hey Meta. I am going to sleep now and will investigate this tomorrow. Thanks for all your help. – Ashirwad Sep 20 '20 at 04:49