Thank you, happy to hear you like the script.
The images are duplicates because you need a smaller image and full size one. Please note that for best results, smaller image should be proportional with full size. This means that cropped smaller image won’t work well when viewing full size image.
For example, let’s say your full image is 1280 x 1024 pixels. If small image is one quarter of full size, your small image must be 320 x 256 pixels.
If you can place your implementation somewhere online and get back here with a link, I can take a look and tell you what might be wrong.