Say if you have set the facebook image for your webpage via the meta tag of the open graph protocol like this:
<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
If you want to replace/update the image with another image of the same name rock.jpg
, how do you get facebook to update your image accordingly with the new image when you share the page? Forcing facebook to fetch your page's data with this link http://developers.facebook.com/tools/debug won't update the image.
if you are using any cache plugin, make sure you clear all your caches. Also make sure the image you are using has the recommended facebook size: 1200(w) x 630(h) or 600 x 315.
Facebook stores your image into their own image on their servers, and then caches it for 24h. The cache delay might change in the future, so to check it just open the image that facebook creates from your image and check its "max-age" value in the http headers. So if you change your image, facebook will not update its version until 24h even if you use this link http://developers.facebook.com/tools/debug to force the data fetching.
To solve this, if you need to see the effect of your change right away you should rename your image. So if the old version was
rock.jpg
name itrock2.jpg
then use this link http://developers.facebook.com/tools/debug to get facebook to create a new image from your updated image. This will update immediately your webpage's facebook image in the facebook share.this is the most consistent answer I've found to this problem: https://stackoverflow.com/a/21468084/339698
If you're too lazy to go to that link, you can
POST
an ajax request with the url you are trying to clear: