1

I am trying to figure out how to show an image preview on WhatsApp Desktop. Recently WhatsApp Desktop was updated. Since then my code has no longer been functional on this. It remains working on WhatsApp mobile.

My index.html script:

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="og, image, test" />
    <meta name="description" content="Og:image test" />
    <meta name="author" content="Maurício Ramos da Silva">

    <meta property='og:image' content='https://teste.mauricioramos.com.br/003.jpg'/>
    <meta property='og:url' content='https://teste.mauricioramos.com.br'/>
    <meta property='og:type' content='website'/>
    <meta property='og:title' content='Duplex/Casa Geminada Venda'/>
    <meta property='og:description' content='Residência geminada com 2 dormitórios (suíte americana), banheiro social, living amplo integrado a cozinha, área de serviço e estacionamento para 2 carros. Forro em laje de concreto, aberturas em alumínio, amplo pátio fechado e individual.'/>
</head>

<body>
    <h1>WhatsApp Desktop og: Test</h1>
    
    <button onclick="share()">Share</button>
    
    <img src="003.jpg" width="300"/>
    
    <script>
        const content = 'Residência geminada com 2 dormitórios (suíte americana), banheiro social, living amplo integrado a cozinha, área de serviço e estacionamento para 2 carros. Forro em laje de concreto, aberturas em alumínio, amplo pátio fechado e individual. https://teste.mauricioramos.com.br';
        const result = 'https://wa.me/?text=' + content;
        
        function share() {
            console.log('open');
            
            window.open(result, '_blank')
        }
    </script>
</body>

It show like:

Image showing share result on WhatsApp

I have tried to change SSL key, from Cpanel Inc. to ZeroSSL with no success.

Furthermore, you can test online here: Click to show webpage

What more I can do?

Maurício
  • 25
  • 6

0 Answers0