To trigger a new window instead of a new tab (something you should generally be reluctant to do) you need to specify some window features which the browser won't apply to a tab.
Setting resizable
is sufficient in Chrome. I haven't tested in other browsers.
HTML:
<a href="http://placekitten.com/100/100" target="_blank">
<img src="http://placekitten.com/100/100">
</a>
JS:
const openInNewWindow = event => {
event.preventDefault();
const {href, target} = event.currentTarget;
const features = "resizable";
window.open(href, target, features);
};
document.querySelector("a")
.addEventListener("click", openInNewWindow);
(Don't bind click event listeners to images, they aren't designed as interactive controls. Users who depend on (for example) a screen reader or a keyboard focus to interact with a document will find it difficult or impossible to trigger a click on an image. Use semantic markup. If you are linking something, use a link, then enhance with JS.)