Skip to main content
Agency Program Get 2× more leads and save 50% on hosting. Built for agencies ready to grow. Book a call
Better REST API Featured Images icon

Better REST API Featured Images

v1.2.1
by Braad Martin · 5.0 (11 reviews)

Adds a top-level field with featured image data including available sizes and URLs to the post object returned by the REST API.

4K+ active installs Updated Jul 30, 2016 Tested to 4.6.29
Try Demo Download
Pre-installed Ready in ~10s No card

About Better REST API Featured Images

This plugin adds a "better_featured_image" field to the post object in the WordPress REST API, which contains information about the featured image of the post, including image sizes and URLs. It allows you to get this information without making a second request, resulting in faster response times. Additionally, you can use a filter to add custom data to the "better_featured_image" field.

Changelog

1.2.1

  • Add fix for bug caused by conflicts with plugins that manipulate image metadata

1.2.0

  • Fix translation files present but not loading
  • Add note to the readme explaining that ?_embed should be tried before using this plugin
  • Fix compat with older betas
  • Add missing PHPDoc statements
  • Tested with v2 beta 12

1.1.1

  • Compatibility with v2 beta 11 of the REST API (now the core field is called featured_media; this plugin’s field is still better_featured_image). Props: filose

1.1.0

  • Add a better_rest_api_featured_image filter for adding custom data to the response. Props: avishayil

1.0.2

  • Change register_api_field to register_rest_field for compatibility with the REST API v2 beta 9. Props: Soean

1.0.1

  • Switch to returning null instead of 0 when no featured image is present

1.0.0

  • First Release

Try other plugins

Really Simple SSL icon

Really Simple SSL

4.9 · 4M+ installs

The easiest way to improve security! Leverage your SSL certificate and protect your website visitors.