title: How to display a loading animation while an image loads in Meteor 0.8
body: <p>I have just upgraded a Meteor app to version 0.8, and a minor UX difficulty has surfaced.</p>
  
  <p>I have a changeable image which is displayed like so:</p>
  
  <pre><code>&lt;img src="/img/{{ image_name }}" class="pull-left"&gt;
  </code></pre>
  
  <p>The user can choose a new image (changing <code>image_name</code>, which is a field in a collection), and the image changes automatically on-screen, as it should.</p>
  
  <p>However, in my tests it seems the behavior while the new image loads is different.  In Meteor 0.7, the image went blank while the new one loaded.  In Meteor 0.8, the old image stays on-screen until the new one is loaded.  I can understand why this would usually be a better result, but in my case, the user is left wondering why the image didn't change, potentially for a few seconds.</p>
  
  <p>So I would like to show a loading animation while the new image loads.  I can start the animation when the new image is chosen, but how do I know when the image has finished loading, so that I can remove the animation?</p>
  
  <p>Or have I misunderstood what is happening?</p>
  
  <p>thanks!</p>