JSFiddle - React, Tailwind, and code Playground
HTML
<div class="e1">
<p>
<img alt="" src="/images/site/pr1.png" /></p>
</div>
<div class="e1">
<p>
<img alt="" src="/images/site/pr2.png" /></p>
</div>
<div class="e1">
<h1>
My new h1
</h1>
</div>
JavaScript
$(".e1").each(function () {
if ($(this).find("img").length>0)
alert($(this).find("img").attr('src'));
});