I have a similar issue; the coding works perfectly in the W3 tutorial, but when I add this code to my website, it doesn't seem to talk to the back end of my Shopify set up?
If I copy+paste the code and publish to my website, it spits the code back at me, however, if simply copy+paste everything from <!Photo-Grid> onwards, the photos appear! ... but not in the grid/tiled effect that I was hoping for. Here is what it currently looks like https://smithers.store/pages/gallery but this is what I want it to look like https://www.w3schools.com/w3css/tryw3css_templates_photo2.htm
Have I missed something? Also, I know this is a slightly different topic, but any idea as to why some of my images are razor sharp, whilst others are blurry? The file sizes are all much the same.
Any help and guidance you could provide would be very much appreciated!