Tell me how to be .. I’m changing meta tags wherever I can to my image, but in the end, when I copy a link on Skype or on Facebook, I still get the old one. enter image description here

It is necessary that it was only the first .. I used the plugin "OG", I wrote the following code in header.php u functions.php into manual:

$first_img = "http://lostandfoundthenovel.com/wp-content/uploads/2017/05/2.png"; function catch_that_image() { global $post, $posts; $first_img = ''; ob_start(); ob_end_clean(); $output = preg_match_all('//i', $post->post_content, $matches); $first_img = $matches [1] [0]; if(empty($first_img)){ //Определяет картинку по умолчанию $first_img = "http://lostandfoundthenovel.com/wp-content/uploads/2017/05/2.png"; } return $first_img; } add_filter('og_image_init', 'my_og_image_init'); function my_og_image_init($images) { if ( is_front_page() || is_home() ) { $images[] = 'http://lostandfoundthenovel.com/wp-content/uploads/2017/05/2.png'; } return $images; } 

 <meta property="og:image" content="<?php if (function_exists('catch_that_image')) {echo catch_that_image(); }?>" /> 

But there is no sense .. it is generated, the inspector shows that there is a new meta tag, but the old one is still displayed .. enter image description here

Site

    1 answer 1

    In the case where the FB has once posted a link to a particular resource on the network, it caches the image, for obvious reasons. In this regard, as a result, you will receive a picture from his cache, and not from the site.

    To correct this situation, you can go to the Facebook Open Graph Debugger ( link ) and use the Scrape again function there. At the same time, to the left of it you can see how long ago the last caching was performed. Well, there are other interesting results too. enter image description here

    • In Skype, the same situation .. what to do then? And those who also copy this link how to be? - Vladyslav Tereshyn
    • Regarding Skype, you can try to create a separate question, and about FB, it updates it automatically every 24 hours, as I recall, if there is a desire to update it yourself, the answer is: stackoverflow.com/questions/12100574/… - Stanislav Belichenko