I am using the following to add a _blank target attribute to all my external links
$.expr[':'].external = function(obj) {
return (obj.hostname != location.hostname) && obj.href.startsWith("http");
};
$('a:external').attr('target', '_blank');
Now, I would like to do similarly for all links that are parent to images.
<a href="..."><img></a>
How can I build a selector to target these instances?