This MediaWiki extension allows use of the ImagesLoaded javascript library, either by other extensions or in [[MediaWiki:Common.js]]
.
imagesLoaded( '#bodyContent', {}, function(){
// do something after images load
});
In your extensions directory:
git clone https://github.com/enterprisemediawiki/ImagesLoaded.git
In your MediaWiki LocalSettings.php
add the following directive:
wfLoadExtension( 'ImagesLoaded' );