I haven't got the time to check your code right now, but did you specify the wrong dimensions for each image by any chance? That's the first and most obvious cause of poor quality image display that springs to my mind.
Surface Pro 5 News - release date, UK price, features, specs
Microsoft Surface Studio hands-on review: the iMac killer is here
Best Mac antivirus 2017
Synology invites you to visit them at Insomnia on 26th – 29th August. Book your tickets now and visit Synology.