Comments (3)
Hi @RoyalCoder88 ,
Thank you for your commendation.
I'd like to address the issue you're encountering. The absence of the featured image URL in the REST API response is due to the fact that the URL field is only present when the "rest api featured image url" plugin is active on your website. This is documented in the respective property's description:
/// Field generated by https://wordpress.org/plugins/rest-api-featured-image/ plugin
final String? featuredImageUrl;
If you prefer not to utilize this plugin, there are alternative solutions. You can modify the functions.php
file to include this capability. Alternatively, you can use the ID from the featuredMedia
property and make a retrieval request to the media interface using that ID. This method will provide you with comprehensive details about the featured image.
Thank you!
from wordpress_client.
@RoyalCoder88
Now that you mention it, i think i may have missed this edit. I had edited my wp installation on test environment to have that key.
I will correct it soon!
from wordpress_client.
Hi @ArunPrakashG,
Thanks for your solution, it's working now. Only one mention the field is featured_media_src_url
not featured_image_url
like in Post
class. Thanks!
from wordpress_client.
Related Issues (20)
- why not one import? HOT 1
- first try crashed HOT 1
- Problem creating new users
- Login HOT 1
- client.media.create is not working HOT 3
- sorry, delete this issue. HOT 1
- Error when using tags.list() HOT 2
- wpResponse.data is empty HOT 5
- How can I update post's meta field? HOT 2
- Loading image from Wordpress on webapp Canvaskit failing HOT 2
- Deciding what fields are included in posts result HOT 12
- Parse "_embedded" variable to gain access to featuredmedia.source_url HOT 5
- Request Uri always return host in InternalRequester HOT 4
- Support for Linking and Embedding ? HOT 5
- Accept a list of status instead of single value in requests HOT 3
- Add models with everything nullable and methods for that and fields param to the request. HOT 3
- How to choose a different URL for each request? and how to mock differents responses based on url? HOT 2
- Should I capture the DioException? Or should the library map them? HOT 9
- Exception when getting posts with context as embed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordpress_client.