Wrong image displayed by LinkedIn Open Graph
Asked Answered
T

4

6

I'm trying to share http://gbgtechweek.com/ on my LinkedIn profile.

I have this meta tag:

<meta property="og:image" content="http://gbgtechweek.com/img/gbgtechweek_img.png" />

However, LinkedIn chooses to show another image from the page (http://gbgtechweek.com/img/goteborg00.jpg)

Is this because of the size, and how do I fix it?

I tried to update by using "?!" in the end, so LinkedIn would re-fetch the Open Graph data, but didn't work.

Any solutions?

Tress answered 22/4, 2015 at 6:24 Comment(0)
L
0

LinkedIn (shockingly and sadly!) only use official partners from http://embed.ly/providers for 'projects' on your profile. Open Graph only works on the LinkedIn feed/sharing updates area.

Otherwise, you can upload an assortment of filetypes to feature, but no way to explicitly to tell LinkedIn which image to use on the profile.

Embed.ly does pick up open graph information on your site, but they don't prioritize the OG information. In fact, Embed.ly wrote a blog post that essentially scoffs at the widespread use of Open Graph tags for sharing and how users and large websites supposedly can't trust them.

EDIT:

To answer the comment:

You can reshuffle things on embed.ly, for example, by disabling your background-image while you add your website to your profile, or switching your background-image to the desired one just long enough for you to get the desired effect on LinkedIn. This isn't a guaranteed fix as LinkedIn may recache the project at a later (any!) time which will set it back to your background-image.

Liebfraumilch answered 22/4, 2015 at 6:38 Comment(1)
Can I in some way restructure the image or give it a property to make it the first in the array of images, at the moment the image I want is the second one..Eulogy
O
4

LinkedIn can take the image from tag named 'oEmbed' despite og:image tag exists.

Here an exapmle:

<link rel="alternate" type="application/json+oembed" href="https://www.s-sols.com/api/oembed/1.0/embed?url=https%3A%2F%2Fwww.s-sols.com%2Fhow-make-multipage-website">
And this JSON content contains ordinary image.

I faced with that problem in WordPress. The cure was to remove this tag as described here:

remove_action('wp_head', 'wp_oembed_add_discovery_links', 10);
remove_action('wp_head', 'wp_oembed_add_host_js');
remove_action('rest_api_init', 'wp_oembed_register_route');
remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10);
Oblique answered 21/8, 2019 at 17:57 Comment(0)
M
2

You can try refreshing the linkedin cache (for a specific link) here:

https://www.linkedin.com/post-inspector/

Menam answered 1/3, 2021 at 13:37 Comment(0)
L
0

LinkedIn (shockingly and sadly!) only use official partners from http://embed.ly/providers for 'projects' on your profile. Open Graph only works on the LinkedIn feed/sharing updates area.

Otherwise, you can upload an assortment of filetypes to feature, but no way to explicitly to tell LinkedIn which image to use on the profile.

Embed.ly does pick up open graph information on your site, but they don't prioritize the OG information. In fact, Embed.ly wrote a blog post that essentially scoffs at the widespread use of Open Graph tags for sharing and how users and large websites supposedly can't trust them.

EDIT:

To answer the comment:

You can reshuffle things on embed.ly, for example, by disabling your background-image while you add your website to your profile, or switching your background-image to the desired one just long enough for you to get the desired effect on LinkedIn. This isn't a guaranteed fix as LinkedIn may recache the project at a later (any!) time which will set it back to your background-image.

Liebfraumilch answered 22/4, 2015 at 6:38 Comment(1)
Can I in some way restructure the image or give it a property to make it the first in the array of images, at the moment the image I want is the second one..Eulogy
W
0

This just happened to me, and the reason was that the filename of the image in the og:image tag had accented Unicode characters in it (e.g., á, é). LinkedIn must skip over filenames with those characters, because it was choosing another image on the page instead.

I changed the image filename to one without Unicode characters and it pulled in the correct image.

Wintergreen answered 31/1, 2018 at 23:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.