Lightbox is nice tool that offers a nice way to add zooming functionality for images. The basic structure is given below
1. HTML code
<a href="asset/images/portfolio/img2.jpg" data-lightbox="picture-8">
<img src="asset/images/portfolio/img2.jpg" alt="" class="img-responsive">
data-lightbox for popup and
href image path is to popup the image.
know more about fancybox setting in this link – http://lokeshdhakar.com/projects/lightbox2/