WordPress + REST API + featured_image

[ad_1]

I currently have a wordpress blog with images stored in an S3 AWS bucket.

I upload the images directly to the bucket “manually”.

I have a file with the image urls for each post.

These posts do not exist yet on my wordpress blog.

I thought I would use the WordPress REST API to create the posts in wordpress.

I thought that I could add the url for my image in the field “featured\_media”. But it seems this field wants the id of the image. I have no id.

Do you know how I can use the api to allocate these images as featured\_media when I create a new post?

Apologies if it is a silly question – I’m not familiar with the API (or wordpress).

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer