title: Get image dimensions from url path
body: <p>I am trying to load the dimensions of an image from url. So far I've tried using <code>GraphicsMagick</code> but it gives me <code>ENOENT</code> error. </p>
  
  <p>Here's the code so far I've written.</p>
  
  <pre><code>var gm = require('gm');
  
  ...
  
  gm(img.attribs.src).size(function (err, size) {
        if (!err) {
              if( size.width&gt;200 &amp;&amp; size.height&gt;200)
              {
                  console.log('Save this image');
              }
        }
  }); 
  </code></pre>
  
  <p>Where <code>img.attribs.src</code> contains the <code>url source path</code> of the image.</p>
  
  <p><strong>Update</strong></p>
  
  <p>value of <code>img.attribs.src</code></p>
  
  <p><a href="http://rack.1.mshcdn.com/assets/header_logo.v2-30574d105ad07318345ec8f1a85a3efa.png" rel="noreferrer">http://rack.1.mshcdn.com/assets/header_logo.v2-30574d105ad07318345ec8f1a85a3efa.png</a></p>