desandro / imagesloaded

:camera: JavaScript is all like "You images done yet or what?"
https://imagesloaded.desandro.com
MIT License
8.88k stars 1.15k forks source link

Is there a way to check if at least one image is loaded? #313

Open bit-pax opened 7 months ago

bit-pax commented 7 months ago

Is there a way to check if at least one image is loaded and get that image's width & height?

So basically all the images I have are the same size, so as soon as one is loaded, I can apply the image dimensions to all image containers and have the app moving forward instead of having to wait for all images to load. I don't do this in advance because the it's designed to be responsive so images sizes can be different depending on the screen width.