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

Parse og:image as u-featured rather than u-image for h-entry #5

Open
aciccarello opened this issue Dec 4, 2023 · 2 comments
Open

Comments

@aciccarello
Copy link

The spec says to parse meta[property="og:image"] tags (and the Twitter card alternative) as u-photo properties.
However, the post-type-discovery algorithm says that the presence of a "photo" property implies that it is a photo post.
The problem is, that in practice og:image is used for blog post cover photos or to improve how links appear on social media.
For example, GitHub generates images for pages on its' site, even though you wouldn't consider a GitHub issue a photo post.

I suggest that these image properties be parsed as u-featured properties instead.
This will be more in-line with how the meta tags are used and matches how the OpenGraph to Microformats2 package implemented it's parsing.

This would only need to be true for h-entrys due to the post type discovery algorithm. A h-card would probably make more sense to use u-photo. I'm not sure what would make most sense for other item types like h-recipe or h-cite.

@gRegorLove
Copy link
Member

Generally sounds good, only exception I thought of was photo sites. I wondered if they used something like og:type=photo but I checked Instagram and Flickr and they both use og:type=article, so I'm not sure I see how the parser could differentiate an actual photo post.

@aciccarello
Copy link
Author

Yeah, I also tried to look around for some pattern photo sites were using but haven't found anything. I'm kinda surprised OGP defined an og:type of video but not photo. I'll keep looking but I doubt there are any usable options.

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

No branches or pull requests

2 participants