Could you please take a look at the image below and tell me what I might be doing incorrectly? When the page initially loads, pictures appear like this. However, if I refresh the page, the issue is resolved.
https://i.sstatic.net/hIyA4.jpg
If I remove the script, everything displays correctly. But once the script is included again, it consistently produces the result shown in the picture upon the first load.