I did some tests and noticed that anywhere you share a link with Opengraph images should always have equal width and height, whether large or small.
What can be done is to set the header to width and height, but I believe this goes from each APP:
<meta property="og:image" content="www.meusite.com.br/imagem.jpg">
<meta property="og:image:type" content="image/jpeg">
<meta property="og:image:width" content="300"> /** PIXELS **/
<meta property="og:image:height" content="300"> /** PIXELS **/
Then what can be seen is to create a PHP that registers the useragent
to see if it is p Whatsapp that will actually read and pass the image to the user, so can set with an algorithm when it is in Whatsapp
will be a file with the image and when it is in the Facebook
will be another with the same image.
So I could sort by types of social networks:
<html>
<head>
<?php
$op = []; //iniciar array
//Código com condições que verifique o app ou rede social usada
//$op[0] vai a URL da imagem no tamanho adequado
//$op[1] a largura especificada
//$op[2] a altura especificada
//$op[3] MIME-TYPE
echo "<meta property=\"og:image\" content=\"".$op[0].".jpg\">\n";
echo "<meta property=\"og:image:type\" content=\"image/".$op[3]."\">\n";
echo "<meta property=\"og:image:width\" content=\"".$op[1]."\">\n";
echo "<meta property=\"og:image:height\" content=\"".$op[2]."\">\n";
?>
<head>
...