I have been trying to display images in a popup window. The images are not in root directory. I have tried javascript window.open but it does not work. I tried writing a php script to which I pass the directory and image name and try to display it in another tab using hyperlink. But that page just displays garbage data.

I have been trying to solve this issue for 3 days but none of the solution seems to work.

Any help in this regard ?