title: Site optimization - Adding image dimentions
body: <p>I'm optimizing my website according to Google's site optimization standards:</p>
  
  <p><a href="http://code.google.com/speed/page-sp...mageDimensions" rel="noreferrer">http://code.google.com/speed/page-sp...mageDimensions</a></p>
  
  <p>For those who are familiar with it, I'm using Firebug -> "Page Speed" tool to analyse my site's 'weak' areas.</p>
  
  <p>About the above link, image dimensions, the question is - I have lots of dynamic images on my site that are uploaded via a CMS and therefore vary in height/width. Therefore, how important is it to specify image dimensions? If a page had say 5-10 images from the CMS, which option below is better:</p>
  
  <p>a) Don't specify image dimensions <br>
  b) Use PHP's getimagesize function to get the image dimension dynamically, and put it in the IMG tag as a "width" and "height"<br>
  c) Update our database to store the width/height per image (I'm already querying other info from the image table in my database, such as the text for the "alt" attribute) and then access those columns for the IMG tag on the front end? <br></p>
  
  <p>I think "c" is the best option but I'd like to hear if anyone has any recommendation or statistics on which option is better. Obviously "c" means we need to query more data from the database.</p>
  
  <p>We're also using a separate database server, and making use of browser caching. (http://code.google.com/speed/page-speed/docs/caching.html)</p>
  
  <p>Thanks</p>