title: Efficient alternative to getimagesize() in php
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4635936/super-fast-getimagesize-in-php">Super fast getimagesize in php</a>  </p>
  </blockquote>
  
  
  
  <p>I want to get the image sizes of all the images within webpages (hence all img tags)</p>
  
  <p>The problem is PHP's <code>getimagesize()</code> function is so inefficient.</p>
  
  <p>I tried running this...</p>
  
  <pre><code>for($i=0;$i&lt;55;$i++){
    getimagesize('http://www.blackcommentator.com/265/265_images/265_cartoon_do_something_now_bill_large.jpg');
  }
  </code></pre>
  
  <p>..and it took a very long time to complete.</p>
  
  <p>I'm wondering if anybody knows of a more efficient alternative to <code>getimagesize()</code> in order to obtain the sizes of images in a webpage using PHP when it is typical to get the sizes of 20-30 images. </p>