To optimize your site's load time you should always code in the dimensions of all images being loaded. We wrote this to simulate a function in PHP that does pretty much the same thing. It's a simple class to return vital stats on an image. This was created to simulate a PHP function. Just pass it the path to your image resource and it gives you back the heght and width, nothing special, just kind of useful.