Reply to the question http://stackoverflow.com/questions/32583854/
Panzoom is Qjuery image viewer with zoom: https://github.com/timmywil/jquery.panzoom
Download all the repository, open file demo-min.html
in your browser. Tested in: Chromium, Firefox.
I've managed to make panzoom position image at center, scaled to the page size. Adding images dynamically is also supported. If you have trouble with displaying the first image, try to load some other with the button. I've added big borders and backgrounds to indicate positions of different elements. However, "Reset" button is not working properly at the moment. Also buttons are fixed and the bottom of the page, but I think the one who wants can move them where it is needed.