How Do I Add Featured Image in WordPress Block Editor?

Adding a featured image in WordPress block editor can be a bit tricky. Here are a few tips:

1. Choose a high-quality image.

2. Make sure the image is in the same directory as the wp-content/plugins/WordPress-block-editor/assets directory.

3. Edit the file wp-content/plugins/WordPress-block-editor/assets/images/featured.

png and add the image URL.

4. Edit the file wp-content/plugins/WordPress-block-editor/assets/js/editor.js and add the following code:

var featuredImage = new Image(); featuredImage.src = ‘http://’ + plugin_dir + ‘/assets/images/featured.png';

5. Save the changes and activate the plugin.