You don’t set featured image for your post ,so return 0 in feature image obj. after set it you can use featured image obj.
for example: I wrote this with PHP, you can upload this to another host and display the images of the WordPress website that you specified in the URL variable on those hosts.
$url="url of your wordpress website";
function Json_Data_Decoder($query){
global $url;
$json = file_get_contents($url.'/wp-json/wp/v2/'. $query);
$data = json_decode($json);
return $data;
}
function Get_Media($post_media){
global $url;
$json = file_get_contents($url.'/wp-json/wp/v2/media?include=".$post_media);
$medias = json_decode($json);
$featured_image = $medias[0]->media_details->sizes->medium->source_url;
return $featured_image;
}
$posts = Json_Data_Decoder("posts');
foreach ($posts as $post){
// get media
$post_media = $post->featured_media;
$featured_image = Get_media($post_media);
echo
'<article class="post image">
<img src="'.
$featured_image .
'">
</article>';
}