Please take a look at the jsFiddle
Every time I run it, I am trying to retrieve the width of the images, but the values I get are as follows (check in the JS console)
400
0
575
533
0
...
Some values are zero, and I can't figure out why. It seems random; different results each time. Even after refreshing the fiddle multiple times (F5), the width values vary. Sometimes accurate, sometimes just 0.
Even when I try running it locally (with images saved on my hard drive), the issue persists.
If anyone has any suggestions or insights into what might be causing this problem, please share!