Make WordPress Core

Opened 16 months ago

Last modified 16 months ago

#58034 new feature request

Post API can't get image URL on Endpoint

Reported by: nodeweb's profile nodeweb Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.2
Component: REST API Keywords: needs-patch 2nd-opinion
Focuses: Cc:


We need to add the featured image URL to the endpoint of the POST API
Instead of getting the featured_media id, we should get the attachment URL, which will be better for everyone

Change History (2)

#1 @spacedmonkey
16 months ago

@nodeweb Have you tried using the _embed functionality. So adding _embed=wp:featuredmedia to the request and getting the embedded featured media.

#2 @rajanpanchal2028
16 months ago

  • Version set to 6.2

Hello @nodeweb
As We have a function for get feature image url by featured_media id no need to add featured image URL on response of Post API.

Note: See TracTickets for help on using tickets.