-
Notifications
You must be signed in to change notification settings - Fork 654
Featured image is not in _links on post response #1476
Comments
Oh, I see we are linked to |
The featured image is not necessarily an attachment of the current page though. (At least I think it isn't) |
I don't know when this changed, but yeah, it does cause problems right now. We're running into problems on a client site with this, since the featured images don't have the post as a parent. We should change to having a direct link to the featured image at |
While we're at it, let's change so nav_menu_item and revision aren't marked as embeddable. Following the 80/20 rule, most people aren't going to need those to render a post. (Standard for picking embeddability should be "would I need this to render the item in a theme?") |
Some comments from @joehoyle in #1563 (comment)
|
Having the featured image in its own dedicated path (inside or outside the 'attachments') would allow you to embed and access its sizes, as well. It would be great to easily grab featured_image/sizes/medium/url. |
Per @danielbachhuber and @joehoyle, let's keep the |
I misread the code here (it allows you to attach featured images for audio or video), but I think we should keep the name as |
I'm +1 on that |
array_name._embedded['wp:featuredmedia']['0'].source_url |
We should link to the featured image, so it can be embedded, see http://demo.wp-api.org/wp-json/wp/v2/posts/111?_embed it's not included in the links.
@rmccue I know we ran into an issue with it embedding all attachments attached to the post, maybe that's the issue here.
The text was updated successfully, but these errors were encountered: