How can we include an image in our website to display in WhatsApp when we share a link like this?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
-
Why does the box-shadow property not apply to a
2018 standards
It takes a few steps to get the perfect preview for WhatsApp, Twitter, Facebook and bookmark icons for pc's and mobile devices. If you like reading go to ogp.me - but make sure to read steps 1 - 6 in this answer to get the best WhatsApp preview.
Step 1: title
Maximum of 65 characters
Step 2: description
Maximum of 155 characters
Step 3: og:title
Maximum 35 characters
Step 4: og:url
Full link to your webpage address
Step 5: og:description
Maximum 65 characters
Step 6: og:image
Image(JPG or PNG) of size less than 300KB and minimum dimension of 300 x 200 pixel is advised
Step 7: og:type
In order for your object to be represented within the graph, you need to specify its type. Here's a list of the global types available: http://ogp.me/#types. You can also specify your own types.
Step 8: og:locale
The locale of the resource. You can also use og:locale:alternate if you have other language translations available.
If you don't specify og:locale, it defaults to en_US.
Step 9: Twitter
For the best Twitter support read this.
Step 10: Facebook
For the best Facebook support read this.
Step 11: favicon
For the best favicon support for all browsers and devices read this.
Bonus step 12: video/audio
It's also possible to share audio/video. Facebook and twitter for example share videos very well. Read ogp.me.
I guess there is no white list in whatsapp, as I found a solution that worked for me. Do as follows. insert 3 meta tags:
Your image must be in .png format and 600x600px dimension and must be named 'logo-yoursite.png' (once it worked for me JUST LIKE THAT)
Dont forget to insert the link to whatsapp in your website:
Do this and you'll be well done!
I documented the perfect detailed solution here - https://amprandom.blogspot.com/2016/12/blogger-whatsapp-rich-link-preview.html There are seven steps to be done to get the perfect preview.
In the above page, you have the required specifications, the character limit and sample tags. Do upvote once you find it satisfactory.
If you want to have a picture next to an url from your website someone shared on WhatsApp, you have to put a metatag on the page where the URL links to, like this:
I had the same issue and the problem was the size of the picture. Whatsapp don't support picture with a size greater than 300KB.
So the most important property to display image on Whatsapp is:
And the size of the image to display must be less than 300KB.
If the problem persists, read also the answer for this similar question
I had the same problem, here is to solve.
It should be show up if you add meta og:image
The problem is whatsapp would not show image if you type without http:// and end with / For example, it show up image and description if you type http://google.com/ but not with google.com
Hope it helps someone.