JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<img alt="example" src="\images\show.jpg" />
<img alt="exampleAll" src="\images\showAll.jpg" />
</div>
JavaScript
var src = $('img[alt="example"]').attr('src');
alert("source of image with alternate text = example - " + src);
var srcAll = $('img[alt="exampleAll"]').attr('src');
alert("source of image with alternate text = exampleAll - " + srcAll );