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

wpseo_opengraph_image should run (even) if there's no image set #20092

Open
monbauza opened this issue Mar 31, 2023 · 1 comment
Open

wpseo_opengraph_image should run (even) if there's no image set #20092

monbauza opened this issue Mar 31, 2023 · 1 comment

Comments

@monbauza
Copy link

Moved from https://yoast.atlassian.net/browse/IM-2033
Reporter: @jonoalderson

Our wpseo_opengraph_image (and wpseo_schema_main_image) filter(s) are used to customize the og:image output.

However, in the case that a post doesn’t have an og:image already set*, then this filter doesn’t run. Our documentation would imply that this is expected/correct behaviour, but this makes it impossible to (efficiently, sensibly) programmatically set images in many cases, and prevents advanced users from customizing the behaviour of their sites.

This is a long-standing issue, affecting many users (including me!); see #15721 and linked discussions.

I think we should treat it like a bug, and ‘correct’ the behaviour.

*Where ‘set’ includes fallback scenarios such as the presence of a featured post image, or post-level/site-level default.

@monbauza
Copy link
Author

Related: #2416

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant