Skip to content

Fix og:image string shorthand using name instead of property attribute#3688

Open
J8118 wants to merge 1 commit intoShopify:mainfrom
J8118:fix/og-image-name-to-property
Open

Fix og:image string shorthand using name instead of property attribute#3688
J8118 wants to merge 1 commit intoShopify:mainfrom
J8118:fix/og-image-name-to-property

Conversation

@J8118
Copy link
Copy Markdown

@J8118 J8118 commented Apr 10, 2026

Title

Fix og:image string shorthand using name instead of property in SEO tags

Description

Summary

In generate-seo-tags.ts line 452, when media is a string, the Open Graph image tag is generated with name: 'og:image' instead of property: 'og:image'. Per the Open Graph protocol, all og:* tags should use the property attribute, not name.

The object-path code (line 481) correctly uses property, and all other og:* tags in the same file use property — this is the only inconsistency, indicating a copy-paste oversight.

File changed:

  • packages/hydrogen/src/seo/generate-seo-tags.ts (line 452)

Before:

generateTag('meta', {name: 'og:image', content: media}),

After:

generateTag('meta', {property: 'og:image', content: media}),

Test plan

  • Verify the generated meta tag uses property="og:image" not name="og:image"
  • Check existing SEO tests for string media path coverage

Open Graph meta tags require the property attribute, not name.
The object-path code and all other og:* tags already use property
correctly — this was the only inconsistency. Updated tests to match.
@J8118 J8118 requested a review from a team as a code owner April 10, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant