title: Use Onload on image tag in ember
body: <p>I have a template in which photos are being displayed in a frame ( each frame is different for different images) .I have written a function which uses the images original height and width and gives me customized width and height for that particular frame inorder to restore the aspect ratio.Now I have called that function through onload as images loads on that particular moment.</p>
  
  <p><strong>My feed.hbs( template)</strong></p>
  
  <pre><code>&lt;img src = "{{photo.0.photo_url}}" onload = "OnImageLoad(event);" {{action "imgOverlay0" photo}}/&gt;
  </code></pre>
  
  <p>Function </p>
  
  <pre><code>function OnImageLoad(evt) {
  
      var img = evt.currentTarget;
  
      // what's the size of this image and it's parent
      var w = $(img).width();
      var h = $(img).height();
      var tw = $(img).parent().width();
      var th = $(img).parent().height();
  
      // compute the new size and offsets
      var result = scaling(w, h, tw, th,false);
  
      // adjust the image coordinates and size
      img.width = result.width;
      img.height = result.height;
      $(img).css("margin-left", result.targetleft);
      $(img).css("margin-top", result.targettop);
      // console.log("result",result)
      return result;
  }
  
  function scaling (w, h, tw, th,false){
     //manipulation with data 
  }
  </code></pre>
  
  <p>But it will not be included in the build of ember as I have kept the function file in <strong>bower_compontent</strong>.How do I include it in my ember app ?</p>