I was recently working on a blog post for Deploy the Fleet when I ran into an issue with the OG image that is shared on social media sites. My usual flow is to push the blog post live and then use the on-page social links to share it to social media.
In this case I had specified the wrong image link for the OG image. Open Graph Images help your social media posts look better. In this case, on LinkedIn, when I went to share the post the image was wrong and looked terrible. No problem, I thought, I’ll just fix the OG image in the header and re-publish the blog post.
Even after fixing the image LinkedIn still wanted to use the old one. That’s when I learned LinkedIn caches OG images for 7 days so even though I fixed it on my end, they didn’t know.
Luckily there is a super easy fix for this which is to use the LinkedIn Post Inspector.
All you have to do is put the URL of the page containing the updated OG image and LinkedIn will re-fetch it and show you the updated version. As long as it looks right in the inspector it will now share properly on the site. Simple as that.