I'm using this code for my category template <?php foreach((get_the_category()) as $category) { echo '<img src="http://example.com/images/' . $category->cat_ID . '.jpg" alt="' . $category->cat_name . '" />'; } ?> Code (markup): I was wondering how I can make it get the image height & width?