rest api – WordPress API, creating Featured Media from image url (nodejs)

Question

I was tasked to create a service that queries the latest posts from another wordpress site and creates a copy of the post on the wordpress site we manage.

It’s a relatively simple task but i can’t figure out how to create a media object from the url of the image i get from the original post, so i can attach it as featured media on the post on our website.

https://developer.wordpress.org/rest-api/reference/media/#create-a-media-item

Note: This process is completely authorized from both parties, it’s a partnership between the two websites.

0
André Alçada Padez 2 months 2022-10-07T15:49:55-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse