Open image in new window

Solution 1:

function swipe() {
   var largeImage = document.getElementById('largeImage');
   largeImage.style.display = 'block';
   largeImage.style.width=200+"px";
   largeImage.style.height=200+"px";
   var url=largeImage.getAttribute('src');
   window.open(url,'Image','width=largeImage.stylewidth,height=largeImage.style.height,resizable=1');
}

HTML code:

<img src="abc.jpg" onClick="swipe();"/>

Solution 2:

For a new window that has a good chance of being lost behind the main window, and generally annoying visitors:

window.open('http://example.com/someImage.png');

I'd just stick to a regular link if I were you.