Javascript – naturalWidth and naturalHeight returns 0
I have a code that checks the ratio of images. It works 9 out of 10 times or even more but once in a while it doesn't work because img.naturalWidth and img.naturalHeight returns 0. I can understand that the image…