I want to pass a local image file name dynamically to a template part. I have check the internet and its very hard to find a tutorial. Can some one help me on this?
hero.html template part.
<!-- wp:image {"sizeSlug":"large"} -->
<figure class="page-banner wp-block-image size-large">
<img src="???" alt="Hero" />
</figure>
<!-- /wp:image -->