New API Builder load image

Hello guys, i hope you are doing great, I’m struggling bad with this:

I have a main domain https://domain.com and a subdomain https://sub.domain.com, both have Bricks Builder, a have a custom post type called cars in https://domain.com, i have validated to let fetchdata using endpoint in it like https://domain.com/wp-json/wp/v2/cars , the endpoint i already tested it in postman and everything fine, i went to bricks in https://sub.domain.com and created a dynamic slider using the new API builder and in there i just put https://domain.com/wp-json/wp/v2/cars , all fine upto now, query shows me the JSON correctly BUT……………….

BUT………………..

It doesn’t matter how i try, i can’t load the featured image in cars endpoint to show them up in https://sub.domain.com , i just got a link like this {query_api @key:‘_links|wp:featuredmedia|0|href’} but can’t show the image

T.T really tricky

I dit something a long time ago for some app getting the feature image by rest api and i remember somehow i first had to register a new rest api route for it to be able to get the image.

It was rest v2 so i doubt there’s changed a lot.

But i forgot most about it.

Here’s something that might (or not..) tell you something:

And make sure en include the _embed in the api url to include media after the questionmark. So

wp/v2/cars?_embed

something like this

1 Like

YOU ARE A M A Z I N G :heart_eyes:

was it just the embed or dit you needed something more?

the code for function.php work as a dream! Just perfect!