Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3 - open graph image dimensions #602

Merged
merged 3 commits into from
Sep 11, 2024
Merged

Conversation

mathiazom
Copy link
Contributor

@mathiazom mathiazom commented Sep 10, 2024

Ensures that the OpenGraph image (og:image) has dimension 1200x630, independent of the original image. Any space not filled by the image is given a transparent background.

Also included the recommended dimensions in the field description.

Visual Overview (Image/Video)

Using a browser extension to preview the OpenGraph image

Before After
image image

Checklist

Please ensure that you’ve completed the following checkpoints before submitting your pull request:

  • Documentation: Relevant documentation has been added or updated (if applicable).
  • Testing: Have you tested your changes thoroughly?

Copy link

vercel bot commented Sep 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
variant-no ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 10, 2024 0:30am
variant-se-2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 10, 2024 0:30am

@mathiazom
Copy link
Contributor Author

It would be nice to give the user the ability to crop the image with the fixed dimensions 1200x630. However, Sanity only seems to provide full cropping abilities (with no custom predefined dimensions) or no cropping.

src/utils/seo.ts Show resolved Hide resolved
@mathiazom mathiazom merged commit c9829ae into v3 Sep 11, 2024
6 checks passed
@mathiazom mathiazom deleted the feat/v3-open-graph-image-dimensions branch September 11, 2024 06:13
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.

3 participants