I have a travel site with a url like this one
http://www.mysite.tv/index.php?destination=somePlace
And when I share the url on Facebook, Telegram and Whatsapp I want to show an image for each destination.
For this in my index.php I have
<meta property="og:image" class="htmlImage" content="https://www.mysite.tv/img/img_<?php echo $_GET['destination'];?>.jpg" />
and in the img folder I have the appropriate image for each location.
The following happens:
To make it work on Facebook, I use the dynamic image but also a generic static image, although only the dynamic one is visible. This way:
<meta property="og:image" class="htmlImage" content="https://www.mysite.tv/img/img_<?php echo $_GET['destination'];?>.jpg" />
<meta property="og:image" class="htmlImage" content="https://www.mysite.tv/img/generic_image.jpg" />
also works for Telegram but this does not work for Whatsapp as it shows a cached static image.
And in Whatsapp only works a static image so I can not show an image for each of the destinations, only the generic static image.
<meta property="og:image" class="htmlImage" content="https://www.mysite.tv/img/generic_image.jpg" />
Is it possible to do some kind of programming to make it work on all three platforms?
If not possible, I mainly need it to work on Whatsapp, why doesn't a dynamic image work here, what can I do?
PS: please understand that it is not a problem of the image showing or not, I follow the design standards and static images always show without problems. It is a question of a dynamic image being displayed in the meta tags.
Thank you! !