How to fix og:image meta-tag doesn’t work when showing thumbnail for link in WhatsApp with HTML?

Spread the love

Sometimes, we want to fix og:image meta-tag doesn’t work when showing thumbnail for link in WhatsApp with HTML

In this article, we’ll look at how to fix og:image meta-tag doesn’t work when showing thumbnail for link in WhatsApp with HTML.

How to fix og:image meta-tag doesn’t work when showing thumbnail for link in WhatsApp with HTML?

To fix og:image meta-tag doesn’t work when showing thumbnail for link in WhatsApp with HTML, we should add the itemprop attribute.

For instance, we write

<meta property="og:site_name" content="site" />
<meta property="og:title" content="title" />
<meta property="og:description" content="description" />
<meta
  property="og:image"
  itemprop="image"
  content="https://picsum.photos/200/300"
/>
<meta property="og:type" content="website" />
<meta property="og:updated_time" content="1440432930" />

to set the itemprop attribute to image to make the image show in WhatsApp.

Conclusion

To fix og:image meta-tag doesn’t work when showing thumbnail for link in WhatsApp with HTML, we should add the itemprop attribute.

Leave a Reply

Your email address will not be published. Required fields are marked *