Expand my Community achievements bar.

SOLVED

How can I add a page thumbnail to appear in sharable link

Avatar

Level 1

How can I add a page thumbnail to appear in sharable link on Linkedin?
My links appear with a different image that is not related to my pages.
So please help me to know how can I show the image in the page in the preview of the social sharable link.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

If by publisher access you mean, the level of permissions in AEM your user have - then I would not expect that this kind of role will have access that will allow to do modifications on code level.

Just to be clear, first some changes (they are simple) on implementation level of you application needs to happen. Changes should be done to expose link to image you have configured in page properties level. Base on what you have wrote on you initial message - I understand this case is not currently supported, so appropriate amendments needs to be done.

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @Omar_Fathy1, according to LinkedIn documentation you should use Open Graph Protocol (OGP) to expose your page metadata - here is link to official documentation [1]

From technical point of view, link to your page thumbnail should be exposed as og:image. You need to add below meta tag in head section of your page.

<meta property="og:image" content="${link.to.thumbnail}" />

[1] - https://www.linkedin.com/help/linkedin/answer/a521928/making-your-website-shareable-on-linkedin?lang...

Avatar

Correct answer by
Community Advisor

If by publisher access you mean, the level of permissions in AEM your user have - then I would not expect that this kind of role will have access that will allow to do modifications on code level.

Just to be clear, first some changes (they are simple) on implementation level of you application needs to happen. Changes should be done to expose link to image you have configured in page properties level. Base on what you have wrote on you initial message - I understand this case is not currently supported, so appropriate amendments needs to be done.

Avatar

Community Advisor

Hi @Omar_Fathy1 ,

       You need to use open graph in page component . You can add below code in your head.html or content.html

You can do it on publisher as well if you have access.

 

<meta property="og:image" content="${pageproperties.imagelink}" />

 

Kr,

Sanjay