Pixel Perfect Post Images

Custom image sizes are almost a must when developing a website for a client. If you create customize sizes for your clients website you can ensure that when the client adds an image to a post it will be the correct size on the front-end, helping resolve broken layout issues I have seen many, many times.

[php]
if ( function_exists( ‘add_image_size’ ) ) {
add_image_size( ‘category-thumb’, 300, 9999 ); //300 pixels wide (and unlimited height)
add_image_size( ‘homepage-thumb’, 220, 180, true ); //(cropped)
}
[/php]