Findings: The image name passed to Seo component is incorrect.
The slug field value of blog post content is fetched and set to id, which is the name of OG image name by OG image generating function runScreenshots. But function slugify(title) is used to generate image name.
Content Field `slug` | google-foobar-first-challenge-caesar-cipher
Content Field `title` | Google FooBar First Challenge
const SeoBanner = `/opengraph-images/${slugify(title)}.png`;
Solution: Pass correct OG image name to Seo component
Story: As a User I am not able to share the blog posts.
Problem: Seo component generates wrong link to Open Graph(OG) image.
Analysis:
<meta property="og:image" content="https://codeanit.com/opengraph-images/google-foo-bar-first-challenge.png" data-react-helmet="true">
title
slug
The OG content passed to Seo component from the Blog template:
OG image generation process by PrinterComponent:
Findings: The image name passed to Seo component is incorrect.
The
slug
field value of blog post content is fetched and set toid
, which is the name of OG image name by OG image generating functionrunScreenshots
. But functionslugify(title)
is used to generate image name.Solution: Pass correct OG image name to Seo component
This will be verified in another task with analysis on OpenGraph for various social media platforms.