Showing Thumbnail for link in WhatsApp || og:image meta-tag doesn't work
To display a thumbnail for a link in WhatsApp, make sure your page's og:image
meta tag is set correctly:
- It should be placed inside the page's
<head>
tags. - The image URL within the
og:image
must be an absolute URL. - The image should be at least 300x200px and its file size should not exceed 300KB.
Here's an example:
After the changes, don't forget to check with Facebook's URL Debugger tool to validate. Be sure your server doesn't block the image.
Adjustments for open graph and WhatsApp link sharing
WhatsApp generates link previews using Open Graph (OG) tags. While og:image
holds the key to thumbnails, WhatsApp has unique requirements that you should keep in mind:
-
Image Size: WhatsApp prefers images that are a minimum of 300x200 pixels. However, keep the image file under 300KB for smooth loading.
-
Specify Image Dimension: Use
og:image:width
andog:image:height
tags to provide explicit image dimensions to WhatsApp. It helps in eliminating image cropping issues. -
Use Secure URLs: If your site is served over HTTPS, include the
og:image:secure_url
tag. This ensures the link is secure and improves mobile browser compatibility. -
Additional OG Tags: Adding
og:site_name
,og:type
andog:updated_time
tags offer more information about your site, leading to better display and functionality. -
Revalidate After Changes: If you make any adjustments, always revalidate using tools like the Facebook Debugger. For WhatsApp, it may be necessary to reopen the app to refresh metadata changes.
Integration with schema.org for boosting SEO
itemprop
attributes can significantly increase the value of your og:image
. Integrating Schema.org markup could help:
-
Within the
<head>
, place your OG meta tags. -
Inside the
<body>
, include aThumbnail
schema link withitemprop="thumbnailUrl"
:
This structured data markup assists messaging platforms and search engines in better understanding and displaying your content.
Advanced: og:image for wider social media compatibility
Queuing up your og:image
for... cross-platform stardom! A thumbnail that shines on WhatsApp can also look good on other social media:
-
Create Cross-platform Thumbnails: Different devices and platforms may prefer specific dimensions. Ensure your
og:image
is appropriate for them all. -
Small Details Matter: If you want to cover all bases, include meta tags for MS Tile alongside your OG tags for comprehensive coverage.
-
Compatibility Issues: Beware of differences between the WhatsApp Android app and other platforms when displaying images. Preempt this by testing on multiple devices.
Was this article helpful?