Journal

WordPress 8 min read

How to Fix a LinkedIn Preview Image Not Showing on WordPress

A WordPress post which shares on LinkedIn without its picture mostly has one of two causes, an oEmbed link in the page's head or a share image saved as WebP. How I found both on this website with Post Inspector, and the fix for each one.

Mike Lopez Designs and builds websites and B2B software

An empty square white frame on a dark plaster wall
On this page
  1. What LinkedIn reads when you paste a link
  2. Check the page in Post Inspector first
  3. Cause one, the oEmbed link in the head
  4. Cause two, a share image saved as WebP
  5. Save the post again after setting the image
  6. Ask LinkedIn to read the page again
  7. Where to start
  8. Frequently asked questions

When a LinkedIn preview image is not showing for a WordPress page, I think the cause is mostly one of two things which come with an ordinary WordPress site, a link in the page’s code which makes LinkedIn treat the page as rich media, and a share image saved as WebP. Until the 15th of September every post and case study on this website appeared on LinkedIn as a bare title with no picture, and the pictures only came back once I had fixed both of those and asked LinkedIn to read each page again.

Both causes are invisible on the page itself, since the website looks fine in a browser, so this post starts with the check which shows you which cause you have, and then goes through the fix for each one.

When you paste a link into a LinkedIn post, LinkedIn fetches the page and reads a few lines in its code, the Open Graph tags, for the title, the description and the image of the preview card. LinkedIn’s guide to making your website shareable asks for og:title, og:description, og:image and og:url, with an image of at least 1200 by 627 pixels and no more than 5 MB.

On a WordPress site those tags mostly come from Yoast SEO, which takes the image set under Social media appearance in the post’s Yoast sidebar first and the featured image next, according to its Open Graph specification. LinkedIn also keeps a copy of what it read, and its help center asks you to allow 48 hours after a link was last shared, so a fix on your website only shows on LinkedIn once LinkedIn has read the page again.

Check the page in Post Inspector first

LinkedIn’s Post Inspector shows exactly what LinkedIn reads from a page, and it’s really the first thing which I would open, because two of its rows point straight at the cause. You paste the address of the page, and Post Inspector lists the title, the type of page, the author and the image which LinkedIn found, with a preview of the card.

On this website in September, Post Inspector found no image for the case studies and the posts, and it also called them rich media and named me as their author, which turned out to be two separate problems on the same pages.

WordPress puts a small link in the head of every single post and page, an oEmbed discovery link, which has been there since version 4.4 so that other websites can embed your post as a card, as its code reference shows. LinkedIn reads that link too, since its help center says that the share box relies on oEmbed as well as Open Graph, and in my tests a page which carried the link was treated as rich media, with the title and the author taken from the link and no image at all, whatever the page’s own Open Graph image said.

I proved it with two throwaway pages which carried identical Open Graph tags, where the page without the link kept its image in Post Inspector and the same page lost it once the link was added, and it also explained why the category pages on this site were the only ones which showed a picture.

The fix is one line in your theme’s functions.php file, or in a code snippets plugin if you would rather leave the theme alone.

remove_action( 'wp_head', 'wp_oembed_add_discovery_links' );

The link is there so that other sites can find your posts as embeddable cards, which means that removing it mostly stops another WordPress site from embedding one of your posts automatically, while the videos and posts which you embed from other sites keep working, because that runs the other way round.

Cause two, a share image saved as WebP

I install the Modern Image Formats plugin on every WordPress site which I build, which makes WebP or AVIF copies of every new JPEG and PNG upload, according to its plugin page, and it’s a big part of why those sites load quickly on a phone. The side effect on this site was that every share image was WebP too, and in my tests in September, Post Inspector found no image on a page whose only image was a WebP file.

LinkedIn’s guide lists JPG, PNG and GIF in its section on image ads and never mentions WebP, so I would give LinkedIn a JPEG and keep WebP for the page itself. On this site that is a small function in the theme, which swaps in a 1200 by 630 JPEG copy of each image through Yoast’s wpseo_opengraph_image filter, with a PNG for any image which has a transparent background, so visitors still receive the lighter WebP file. If somebody else looks after your theme, that function is a short job for them, and the thing to check afterwards is that the og:image line in your page source ends in .jpg rather than .webp or .avif.

Save the post again after setting the image

There is one more trap, which has cost me time before, and it appears when a featured image is attached in the same moment that it is uploaded, as my publishing script used to do, since Yoast can then write the page without any image tag while the image’s details are not ready yet. Saving the post once more fixes it, so after any change to a post’s image I would press Update again and look for og:image in the page source, which View Page Source in your browser’s menu opens.

Ask LinkedIn to read the page again

Once the fix is live, paste the address into Post Inspector again, which LinkedIn’s help center names as the way to refresh a preview that shows an old image, and the image row should now show a picture. Only the posts which you write after that will show the new card, because a post which you shared before the fix keeps the card it had, and in my tests adding a tracking tag such as ?utm_source=linkedin to the address did not force a fresh read while the page’s canonical address stayed the same.

What Post Inspector shows What it means What fixed it on this site
Rich media, an author, no image LinkedIn followed the oEmbed link Removing the oEmbed discovery link
No image, with a .webp or .avif image in the page source LinkedIn did not use the WebP image A JPEG copy of the image in og:image
No og:image in the page source at all Yoast wrote the page before the image was ready Saving the post again
The old image or title after a fix LinkedIn’s saved copy of the page Inspecting the address again

Where to start

I would paste the address of your newest post into Post Inspector and read two rows, the type and the image, and then open the same post with View Page Source and search for og:image to see whether the image ends in .webp or .avif. Those two checks take a minute, and together they tell you which of the fixes above your site needs, and if the cover itself is a stock photo, it’s worth checking that file too, which I explained in my post on whether stock photos are AI generated. A major Yoast update can change these tags too, so I check them again after one, as part of the routine in how to update WordPress plugins safely.

Frequently asked questions

Why is my LinkedIn preview image not showing?

On a WordPress site it is mostly the oEmbed discovery link, which makes LinkedIn treat the page as rich media and drop the image, or a share image saved as WebP, and Post Inspector shows which one through its type and image rows.

Does LinkedIn support WebP images in link previews?

LinkedIn’s guide lists JPG, PNG and GIF and never mentions WebP, and in my tests Post Inspector found no image when a page’s only image was WebP, so I would give LinkedIn a JPEG or PNG copy.

What size should a LinkedIn preview image be?

LinkedIn asks for at least 1200 by 627 pixels and no more than 5 MB, with a ratio of 1.91 to 1, and the copies on this site are 1200 by 630 JPEGs.

How do I refresh a LinkedIn link preview?

Paste the address into Post Inspector, which reads the page again, and then write a new post with the link, since a post which was shared before the fix keeps the card it had.

Will removing the oEmbed link break anything on my site?

It stops other sites from finding your posts as embeddable cards, so another WordPress site can no longer embed one of your posts automatically, while the videos and posts which you embed from other sites keep working, because that runs the other way round.

Keep reading

All posts

WordPress 8 min read

WordPress Changes Not Showing? Clear the Caches in This Order

WordPress 8 min read

Briefly Unavailable for Scheduled Maintenance, and How to Clear It

WordPress 8 min read

How to Update WordPress Plugins Safely, One at a Time

Planning a website or B2B software? I’m happy to talk it through with you.

Download my resume PDF, updated for 2026.