node-wpapi icon indicating copy to clipboard operation
node-wpapi copied to clipboard

How do I get the href to a featured image?

Open charlestbell opened this issue 2 years ago • 1 comments

Hi,

I'm trying out this package. The way I was loading posts before, using just fetch, it would return the href of the featured image for each post.

With WPAPI.js, I can get a featured_media id tag, but that's it. I'd rather not make seperate calls for each image, but let the browser handle image loading. How can I make .posts() load the featured image href?

charlestbell avatar Dec 27 '22 18:12 charlestbell

Nvm, I realized that the apis for wordpress.com and wordpress.org are completely different.

charlestbell avatar Dec 27 '22 20:12 charlestbell