Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Image not showing when sharing a link on LinkedIn WordPress

  • SOLVED

Hi There,

I have a client site built with Elementor, with various plugins.

The problem we have is that when we share a URL from the site on LinkedIn, the og:image is not being found, even though it can be clearly found in the source code.

I am really confused why this is happening. I have searched the web for a solution and have found other having problems, but never really come accross a solution or figured out the cause.

We are using Yoast SEO.

Here is the site:
https://www.regenerativetravel.com/

https://www.linkedin.com/post-inspector/inspect/https:%2F%2Fwww.regenerativetravel.com%2F

Thanks

Answers (7)

2021-01-25

Navjot Singh answers:

I am using Yoast SEO and mine appear correctly in Linkedin without using name="image" in meta.

One thing you can try is resizing your image to (2:1) aspect ratio i.e. width should be approx double the height. See if that helps.


User179881 comments:

Hi, Thanks

I have just tried this on a single post, but it did not work.

Thank you

2021-01-25

Jayaram Y answers:

Hi,

I think the image is too big.

Please add image, title, description to the Yoast social settings on-page.

Once done, Go to https://www.linkedin.com/post-inspector/ and fetch the page. If you don't see your image clear your website cache and try again.

Once you see the image on the above link, then the sharing for that URL will work correctly. This link is used to clear the cache on the LinkedIn side.

Suggested images sizes below:
Facebook, WhatsApp, Linkedin - 1200 by 630 pixels.
Twitter - 1024 by 512 pixels

2021-01-25

Nilesh shiragave answers:

You can test at https://www.linkedin.com/post-inspector/
To check if it is working or not.

Looks everything perfect for open graph data
https://developers.facebook.com/tools/debug/?q=https%3A%2F%2Fwww.regenerativetravel.com%2F

LinkedIn caches link preview content for 7 days.

Here are the image requirements specific to the LinkedIn sharing module:
Max file size: 5 MB
Minimum image dimensions: 1200 (w) x 627 (h) pixels
Recommended ratio: 2:1

Can you change image ratio and check?

Which Version of WordPress and Yoast SEO you are using?


Nilesh shiragave comments:

Do you have any security plugin installed on the website?


Nilesh shiragave comments:

Do you have a ‘security’ plugin active on your site? It might prevent some useful bots from crawling your websites, such as those from LinkedIn.

2021-01-25

Monit Jadhav answers:

Are you using free version of Yoast plugin?

No issues with the meta tag and image dimensions are a problem, the free plugin i think does not be allowing for social share image preview.

2021-01-25

Mohamed Ahmed answers:

Hello there,

You need to edit the "header.php" file of the active theme by this URL
https://www.regenerativetravel.com/wp-admin/theme-editor.php?file=header.php&theme=hello-theme-child-master

Replace this line
<html <?php language_attributes(); ?>>
With this
<html <?php language_attributes(); ?> prefix="og: http://ogp.me/ns#">


User179881 comments:

Hi Thanks.

I have just tried this but still no luck!

Thanks


Mohamed Ahmed comments:

Hello again,

You must change the dimensions of the image to be in minimum : 1200 (w) x 627 (h) pixels
you can see the Linkedin inspector result of your content with your image(resized to 1200px x 700px)
https://www.linkedin.com/post-inspector/inspect/https:%2F%2Fprowpsite.com%2Fdemo.html

Regards

2021-01-25

Fahad Murtaza answers:

Change this:
<meta property="og:image" content="https://www.regenerativetravel.com/wp-content/uploads/2020/12/Regenerative-Travel-Social.jpg">
to

<meta name="image" property="og:image" content="https://www.regenerativetravel.com/wp-content/uploads/2020/12/Regenerative-Travel-Social.jpg">

You are missing name="image"


User179881 comments:

How can I do this while we are using Yoast SEO?

Thanks


Fahad Murtaza comments:

Try this in functions.php:


function theme_xyz_header_metadata() {
// Page conditional if needed
if ( is_front_page() ) {
?>
<meta name="image" property="og:image"
content="https://www.regenerativetravel.com/wp-content/uploads/2020/12/Regenerative-Travel-Social.jpg">
<?php
}
}

add_action( 'wp_head', 'theme_xyz_header_metadata' );


User179881 comments:

I don't think this is a good solution. I need it to work across all pages and posts.

Thanks


Fahad Murtaza comments:

Okay. This is an example. You can apply to all pages and make it dynamic for featured images.


User179881 comments:

Ok if there is some code I can try to make it work on all pages and posts, so it is dynamic for the featured image that would be great.


User179881 comments:

Hi Fahad,

I just tried your code in the function.php.

I can see it has added the meta for the ogimage and has name=image.
However I just tried the LinkedIn Post Inspector and it has not found this meta.

Thanks

2021-01-25

Ali Hussain answers:

Have you disabled ombed on your website?
There are instances when disabling oembed causes conflicts with linkedin


User179881 comments:

I've just had a search in all the plugins and theme settings and cannot see any reason to believe we have disabled ombed on the site.


Ali Hussain comments:

Is it possible to disable the optimization plugin that is being used and try.