WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 5 months ago

#48493 closed defect (bug) (invalid)

avatar_url has been removed from post authors on the posts endpoint, even with _embed=1

Reported by: cwiglar Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: REST API Keywords:
Focuses: Cc:

Description

Our self hosted website has been making the following request to our wordpress.com hosted CMS:

https://public-api.wordpress.com/wp/v2/sites/examplesite.wordpress.com/posts?_embed=1

The returned posts include author under the _embedded key, as per the docs (https://developer.wordpress.org/rest-api/using-the-rest-api/linking-and-embedding/), but for some reason the authors 'avatar_urls' property is no longer present, even though it still exists in the schema (https://developer.wordpress.org/rest-api/reference/users/#schema-avatar_urls)

This broke our site which was displaying avatars on the home page. Please can you include author.avatar_urls in the posts response when _embed=1 is set, as per the docs and previous versions?

Change History (1)

#1 @earnjam
5 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Severity changed from major to normal
  • Status changed from new to closed

Hey @cwiglar, welcome to WordPress Trac. This is a question you need to ask over on WordPress.com, as their API is customized from what ships with WordPress by default.

WordPress Core still returns the avatar_urls property. You can see this on WordPress.org, where we use the latest core build: https://make.wordpress.org/core/wp-json/wp/v2/posts?_embed=1

Note: See TracTickets for help on using tickets.