one more thing.
i am not a coder so cant say.
i would still suggest you to open image in original size cuz the issue is the end user might have to click twice to see original file instead same file in lightbox window with another click.
it would be a disadvantage to give two click instead one to see large file. it is to be meant to open large when clicked on smaller image to zoom it cuz the criteria for clicking on small is to see large view.