A straightforward WordPress plugin that enforces the addition of a featured image to posts before they can be published.
This plugin ensures that posts have appropriately sized featured images before they can be published. It provides both server-side validation and real-time JavaScript checks in the post editor.
- Prevents publishing posts without featured images
- Supports minimum image size requirements
- Works with both Classic and Gutenberg editors
- Configurable post type support
- Customizable minimum image dimensions
- Real-time validation in the post editor
- Upload the plugin files to the
/wp-content/plugins/require-featured-imagedirectory - Activate the plugin through the 'Plugins' menu in WordPress
- Configure the plugin settings under Settings > Req Featured Image
By default, the plugin works only with Posts. You can enable it for other post types that support featured images through the settings page.
You can set minimum dimensions for featured images:
- Default width: 800px
- Default height: 600px
Set both values to 0 to accept any image size.
- Create or edit a post
- Attempt to publish without a featured image
- The plugin will:
- Display a warning message
- Disable the publish button
- Prevent publishing until a valid featured image is set
The plugin consists of three main components:
require-featured-image.php: Core plugin functionalityadmin-options.php: Settings page implementationrequire-featured-image-on-edit.js: Client-side validation
- WordPress 5.0 or higher
- PHP 7.0 or higher
This project is licensed under the GPL v2 or later.
Mike Kipruto
- Website: kipmyk.co.ke
- GitHub: kipmyk
Please use the GitHub issues page to report bugs or request features.