WordPress now comes pre-installed with an API. This API allows you to access different data end-points to your wordpress instance.
So instead of starting up a laggy browser, logging into your dashboard, and waiting 15 minutes for PHP to respond… You can write your own apps that deal with the WordPress API to quickly create, read, update, and delete posts.
By default, the WordPress API is turned on and is accessible. You access the API by going to the main endpoint, which is
For example, the API on this site is
But lots of API beginner’s always ask
“Where is the WordPress API image end point?”
Also by default, the WordPress API keeps the amount of data it processes as light as possible. So objects like images aren’t sent with any API responses. To access your image endpoint, you have to make a request to the API, but have to add a query string.
So to have WordPress send you a data response that includes the image, the endpoint is:
var data = JSON.parse(data);
// Once in a object array you cam access the image by using the following array indexes
var image = data["_embedded"]["wp:featuredmedia"];
You can see all the API enpoints here as well.