My thumbnail image and summary doesn't show up in links

When I want to share my post on telegram or twitter my thumbnail for the post doesn’t show up.
What should I do?

You are more likely to receive a prompt and accurate response if you post a link to the public repository for your project.

See https://discourse.gohugo.io/t/requesting-help/9132.

Let us see your code

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.

Sorry my repo is private and I don’t want it to be cloned. I am running my website for more than a year now. I have thumbnail, summary and description in my front-matter but it doesn’t show up in link previews.

Without something to look at, I would just be guessing.

It’s not really a Hugo related question. You can have an image when you share a link if your theme offers “Open Graph Tags”. Check the docs and add these tags.

I actually made the theme myself ,
The thumbnail and summary does show up in LinkedIn but not in twitter!
I can’t put a pin on it.

Back to my answer :wink: LinkedIn uses the first image in your content and the description tag. Twitter uses Open Graph Tags.

1 Like

So I need to insert open graph metatags all over my theme.