title: How to handle "image corrupt or truncated" in firefox
body: <p><b>PLUGIN</B></p>
  
  <p>I am using a jQuery plugi called <a href="https://github.com/tuupola/jquery_lazyload" rel="nofollow">lazyload</a>.</p>
  
  <p>What this does is <code>lazy</code> load images - meaning it does not render them in the browser until the image is within the scope of the viewport.</p>
  
  <p>This is useful when you have a page that has many images, for example, and you don't want it to spend forever with the initial load.</p>
  
  <p><b>FIREFOX</b></p>
  
  <p>Ok, so I am also using <code>Firefox</code> version <code>23.0.1</code></p>
  
  <p><b>PROBLEM</b></p>
  
  <p>The plug in is great, however when scrolling down after some images I start getting errors where the image doesn't load (just has a generic place holder for a broken image link) and in the console it <strong>logs:</strong></p>
  
  <p><code>Image corrupt or truncated: [image url]</code></p>
  
  <p>It is not that there is a problem with the image. They all render fine individually.</p>
  
  <p>It is not on a SPECIFIC image as it is random. If I load the page again, the images that were <code>corrupt</code> may load now, with other images returning a broken link and logging <code>corrupt</code> in the console.</p>
  
  <p>I searched around for this, and it seems that there is some problem with simultaneous fetches for an <code>&lt;img&gt;</code> src tag. </p>
  
  <p>Possibly there should be a delay set on the fetch, however you cannot always tell how long the delay should be. And if one image is larger than another, it could still conflict (with a static delay time, as opposed to a <code>complete</code> callback).</p>
  
  <p>Therefore, <strong>I would like to request:</strong></p>
  
  <p><strong>a)</strong> If anybody knows of a solution to this (such as catching when the error occurs and re-triggering the load image function)<br>
  <strong>b)</strong> If anybody can propose an <code>$.extend()</code> to the library above (lazyload) that would create a callback function and wait until all active fetches are <code>complete</code> before loading the next one (IF this is the problem - I am not sure if it is)
  <i>I am not a jQuery ninja so I am a little lost on the code. I could figure it out, but it would probably be dirty...</i><br>
  <strong>c)</strong> if this is NOT the problem, then some direction as to how I can solve this would be appreciated</p>