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?
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
.
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.
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">
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);
来源:https://stackoverflow.com/questions/29789339/wrong-image-displayed-by-linkedin-open-graph