开发者 | icelayer |
---|---|
更新时间 | 2024年9月20日 04:05 |
捐献地址: | 去捐款 |
PHP版本: | 7.4 及以上 |
WordPress版本: | 6.6 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
featured_media_src_url
, this plugin embeds the direct URL of the featured image into your REST API responses. This eliminates the need for additional API calls to fetch featured images, resulting in faster load times and enhanced site performance.
Key Features:
– Direct Access to Featured Image URL: Adds featured_media_src_url
to REST API responses, providing immediate access to the featured image URL.
– Performance Optimization: Reduces the number of API requests, improving the speed and efficiency of your applications.
– Custom Post Type Support: Fully supports custom post types, allowing you to enable or disable the featured image URL field for specific post types through the admin settings.
– User-Friendly Configuration: Easy to install and configure without any coding.
Why Use REST API Featured Image?
When developing applications or themes that rely on the WordPress REST API, accessing the featured image typically requires an additional request for each post. This can be time-consuming and may negatively impact site performance. REST API Featured Image addresses this issue by including the featured image URL directly in the REST API response, saving you time and resources.
REST API Featured Image Field:
– featured_media_src_url
rest-api-featured-image
folder to the /wp-content/plugins/
directory.
– Or install the plugin directly through the WordPress plugins screen.After installing and activating the plugin, the REST API responses for your selected post types will include a new field named featured_media_src_url
. This field contains the direct URL to the featured image.
Yes, the plugin fully supports custom post types. You can enable or disable the featured image URL field for any post type via the plugin's settings in the admin area.
Absolutely. By eliminating the need for additional API requests to fetch featured images, your site's performance and load times will improve.
Not at all. The plugin is user-friendly and requires no coding skills. Simply install, activate, and configure your settings.