WordPress Featured Image Hide

Hi everyone,

I am building a custom WP theme using Blocs and on the homepage, I have put a post grid with featured images.

The issue here is that the featured placeholder image is loading even for the post that has no featured image set. So how can we set it to only show the image where there’s a featured image set in a post, and not show anything when there’s no image selected in a post?

Thank you!