Search code examples
imagelinkedin-apifacebook-opengraphsharing

Cannot clear cached images from LinkedIn sharing dialog box


I have a page using custom sharing links to several different social network websites. When the LinkedIn button is clicked and the share prompt opens, the first three images on the page get pulled into its preview box as preview thumbnails.

One of the latter images are not allowed to be displayed on social networks due to regulatory requirements. I found solutions on SO how to prevent that image from being pulled in the first place, which have been implemented.

The problem now is the LinkedIn cache is being super stubborn and even after all the implementations, I can't get the offending preview image removed from the list of 3 thumbs when sharing to LinkedIn. I've tried everything: using multiple og:image tags, making the img into a div background image, placing (off-screen) alternate 350x250 JPGs at the top of the page, changing the og:url link (same domain though), even going so far as to delete the offending image off the server, but the LinkedIn cache is still holding on to that image and there's nothing I can do to get rid of it.

Any other solutions to force LinkedIn to clear the 3 preview images?


Solution

  • Linkedin cache lasts a week. See here, scroll to bottom: https://developer.linkedin.com/docs/share-on-linkedin

    Super frustrating, but them's the facts.