The visual aspects of a site are important and many themes depend on the ‘Featured Image’ functionality in WordPress to provide a better visual experience. So, it only makes sense that you may want to consider requiring a featured image before a post can be published.
Here is one way you can do this in WordPress:
This code will make sure a featured image is set before allowing you to publish a post. If a post is already published and there is no featured image, it won’t do anything. This code won’t prevent you from removing a featured image once a post is published.