If you do not specifically need the alt text of an image, then you can just target the class/id of the image.
$('img.propImg').each(function(){
enter code here
}
I know it’s not quite answering the question, though I’d spent ages trying to figure this out and this question gave me the solution :). In my case I needed to hide any image tags with a specific src.
$('img.propImg').each(function(){ //for each loop that gets all the images.
if($(this).attr('src') == "img/{{images}}") { // if the src matches this
$(this).css("display", "none") // hide the image.
}
});