8.8k GitHub stars and counting — desandro/imagesloaded is a JavaScript project TopGit is tracking across repositories on the platform. :camera: JavaScript is all like "You images done yet or what?"
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
// jQuery
$('#container').imagesLoaded().always( function( instance ) {
console.log('ALWAYS - all images have been loaded');
});
// vanilla JS
imgLoad.on( 'always', function( instance ) {
console.log('ALWAYS - all images have been loaded');
});
Triggered after all images have been either loaded or confirmed broken.
instanceimagesLoaded - the imagesLoaded instance
done
// jQuery
$('#container').imagesLoaded().done( function( instance ) {
console.log('DONE - all images have been successfully loaded');
});
// vanilla JS
imgLoad.on( 'done', function( instance ) {
console.log('DONE - all images have been successfully loaded');
});
Triggered after all images have successfully loaded without any broken images.
fail
$('#container').imagesLoaded().fail( function( instance ) {
console.log('FAIL - all images loaded, at least one is broken');
});
// vanilla JS
imgLoad.on( 'fail', function( instance ) {
console.log('FAIL - all images loaded, at least one is broken');
});
Triggered after all images have been loaded with at least one broken image.
progress
imgLoad.on( 'progress', function( instance, image ) {
var result = image.isLoaded ? 'loaded' : 'broken';
console.log( 'image is ' + result + ' for ' + image.img.src );
});
Triggered after each image has been loaded.
instanceimagesLoaded - the imagesLoaded instance
imageLoadingImage - the LoadingImage instance of the loaded image
Properties
LoadingImage.img
Image - The img element
LoadingImage.isLoaded
Boolean - true when the image has successfully loaded
imagesLoaded.images
Array of LoadingImage instances for each image detected
var imgLoad = imagesLoaded('#container');
imgLoad.on( 'always', function() {
console.log( imgLoad.images.length + ' images loaded' );
// detect which image is broken
for ( var i = 0, len = imgLoad.images.length; i < len; i++ ) {
var image = imgLoad.images[i];
var result = image.isLoaded ? 'loaded' : 'broken';
console.log( 'image is ' + result + ' for ' + image.img.src );
}
});
Webpack
Install imagesLoaded with npm.
npm install imagesloaded
You can then require('imagesloaded').
// main.js
var imagesLoaded = require('imagesloaded');
imagesLoaded( '#container', function() {
// images have loaded
});
Use .makeJQueryPlugin to make .imagesLoaded() jQuery plugin.
// main.js
var imagesLoaded = require('imagesloaded');
var $ = require('jquery');
// provide jQuery argument
imagesLoaded.makeJQueryPlugin( $ );
// now use .imagesLoaded() jQuery plugin
$('#container').imagesLoaded( function() {...});
Run webpack.
webpack main.js bundle.js
Browserify
imagesLoaded works with Browserify.
npm install imagesloaded --save
var imagesLoaded = require('imagesloaded');
imagesLoaded( elem, function() {...} );
Use .makeJQueryPlugin to make to use .imagesLoaded() jQuery plugin.
var $ = require('jquery');
var imagesLoaded = require('imagesloaded');
// provide jQuery argument
imagesLoaded.makeJQueryPlugin( $ );
// now use .imagesLoaded() jQuery plugin
$('#container').imagesLoaded( function() {...});
Browser support
Chrome 49+
Firefox 41+
Edge 14+
iOS Safari 8+
Use imagesLoaded v4 for Internet Explorer and other older browser support.
Development
Development uses Node.js v16 with npm v8
nvm use
MIT License
imagesLoaded is released under the MIT License. Have at it.
How active is development on desandro/imagesloaded?
The most recent commit recorded on desandro/imagesloaded was 4.7 years ago, based on the GitHub push timestamp. The repository has 1.1k forks — one of the better signals of community interest.
How many stars does desandro/imagesloaded have?
desandro/imagesloaded has 8.8k GitHub stars — refresh the page for the live number, or check github.com/desandro/imagesloaded. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is desandro/imagesloaded open source?
Yes — desandro/imagesloaded ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/desandro/imagesloaded.
What is desandro/imagesloaded?
desandro/imagesloaded (desandro/imagesloaded) is a JavaScript project on GitHub. From the project's own README: :camera: JavaScript is all like "You images done yet or what?"
Where do I read more about desandro/imagesloaded?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/desandro/imagesloaded is the definitive source.
Read full README in the tab above.
Curious whether imagesloaded is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about imagesloaded.