Skip to content

Update og:image meta tag #2479

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

Merged
merged 3 commits into from
Oct 19, 2022
Merged

Update og:image meta tag #2479

merged 3 commits into from
Oct 19, 2022

Conversation

gtback
Copy link
Member

@gtback gtback commented Jul 19, 2022

The previous image is a 404, so this puts an image on Twitter, Facebook,
etc.

Fixes #2428

The previous image is a 404, so this puts an image on Twitter, Facebook,
etc.

Fixes #2428
@gtback gtback requested a review from bmorelli25 July 19, 2022 01:27
Copy link
Member

@bmorelli25 bmorelli25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I attempted to test this PR with the Meta sharing debugger. I see this warning:

Screen Shot 2022-07-18 at 6 53 24 PM

Do we want to specify a default height and width? Meta for developers says this:

Use og:image:width and og:image:height Open Graph tags to specify the image dimensions to the crawler so that it can render the image immediately without having to asynchronously download and process it.

Testing with Twitter's dev tools produces a similar warning.

@gtback
Copy link
Member Author

gtback commented Jul 19, 2022

Thanks, @bmorelli25 . Yep, I probably should. I wonder if the fact that it's an SVG image has any impact.

@gtback
Copy link
Member Author

gtback commented Oct 17, 2022

@bmorelli25 once the build is finished, would you be able to test this again? I don't have a Facebook account to test with.

@gtback gtback requested a review from bmorelli25 October 17, 2022 20:37
Copy link
Member

@bmorelli25 bmorelli25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as it looks like this problem has been fixed. I now get other warnings when testing though:

Hmmm. I can't upload screenshots right now.

Here's the text:

Warnings That Should Be Fixed
Missing Properties
The following required properties are missing: og:url, og:type, og:title, og:description, fb:app_id

@gtback
Copy link
Member Author

gtback commented Oct 19, 2022

Thanks, @bmorelli25. I'll merge this to fix the immediate issue (the image not existing) and create a separate issue (TBD when anyone will get to it) for the other fields; a lot of those will need to be templated per-page rather than hard-coding in the template.

@gtback gtback merged commit 37b3a82 into master Oct 19, 2022
@gtback gtback deleted the gtback/og-image branch October 19, 2022 15:04
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.

Fix og:image in template
2 participants