title: imagesloaded plugin sometimes doesn't load image properly
body: <p>I'm building an app which loads multiple images and animates them in. In order to do that I need to load the image, grab the width and set the margin-left to the width of the image. This works most of the time, but sometimes the imagesloaded plugin thinks the image is loaded, but when I access the width it comes out as NaN.</p>
  
  <pre><code>    $(fragment).imagesLoaded()
      .done( function() {
          console.log('done');
      })
      .always( function( instance ) {
          console.log('all images loaded');
      })
      .fail( function() {
          console.log('all images loaded, at least one is broken');
      })
      .progress( function( instance, image ) {
          var result = image.isLoaded ? 'loaded' : 'broken';
          console.log( 'image is ' + result + ' for ' + image.img.src );
  
          $.each(elems, function( k, v ) {
              var imagewidth = image.img.width * $('.row').height() / image.img.height;
              console.debug('---------------------');
              console.debug('v: ', v);
              console.debug('v.width: ', imagewidth);
              console.debug('isNaN: ', isNaN(imagewidth));
              if (isNaN(imagewidth)) {
                  $(v).css({'margin-left': '-' + imagewidth + 'px', 'margin-right': '100px'});
                  $(v).stop().animate({'margin-left': 0, 'margin-right': 0}, 400, 'easeOutCubic');
  
              }
  
          });
      });
  </code></pre>
  
  <p>Any suggestions / ideas appreciated. I'm using Google Chrome on a Mac!</p>