rest-api-featured-image

This WordPress plugin adds a new field to the WordPress REST API, allowing you to easily retrieve the featured image source URL without making an additional request.

GPL-2.0 License

Stars
2

Note: This is the development version and contains features that may be in various stages of development. If you want to use this on a live website download here: REST API Featured Image.

REST API Featured Image

The REST API is an essential part of WordPress that enables developers to create applications that interact with WordPress sites. In many cases, developers need to get the featured image from the WordPress REST API. However, retrieving the featured image can sometimes require an additional request, which can be time-consuming and reduce site performance. The Featured Image Src Field plugin was created to solve this issue.

With the Featured Image Src Field plugin, you can add a top-level featured image src field with the featured image src URL. This enables you to get the featured image directly without making an additional request, thereby improving site performance.

The plugin is easy to use and requires no coding knowledge. Once installed, you can set the featured image post type in the admin section, where you can choose to enable or disable for specific post types. This gives you complete control over which post types you want to include or exclude from the featured image src field.

The plugin also adds a REST API featured image field, which is named "featured_media_src_url". This field enables you to retrieve the featured image URL directly from the REST API without having to make an additional request. This can be a significant time-saver for developers who need to retrieve featured images frequently.

The Featured Image Src Field plugin is an excellent solution for developers who need to retrieve featured images from the WordPress REST API. It is easy to install, simple to use, By adding a top-level featured image src field, developers can get the featured image URL directly from the REST API without making an additional request, which saves time and enhances site performance.

REST API Featured Image Field: featured_media_src_url