[wp-trac] [WordPress Trac] #44470: meta property=“og:image” doesn't register if an image is executed via a shortcode in WP Post and Pages
WordPress Trac
noreply at wordpress.org
Wed Jun 27 23:03:29 UTC 2018
#44470: meta property=“og:image” doesn't register if an image is executed via a
shortcode in WP Post and Pages
--------------------------------------+------------------------------
Reporter: nlstm | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 4.9.6
Severity: critical | Resolution:
Keywords: dev-feedback needs-patch | Focuses:
--------------------------------------+------------------------------
Comment (by webdados):
I still think the open graph image should be set explicitly, either by
using the post featured image, a custom field, or a WordPress filter.
Getting it from the post content is the last resort and Facebook already
does that on the final HTML, no shortcodes hassle whatsoever. (And yes, I
also do that on my plugin, but I do not parse shortcodes. God knows what
each and every shortcode does each time he's parsed and I don't think I
want to mess with that.)
I strongly disagree with this: "the best practice is to by default get the
images from the content section of the site".
Maybe Open Graph tags will be supported in core sometime in the future but
with Gutenberg around the corner, I seriously doubt "parsing shortcodes to
find images for Open Graph" will ever be something implemented in core.
WordPress is moving towards making shortcodes deprecated.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44470#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list