I always though the the image manager into wp is not really good... I need to be able to generate square or custom size when i like where i like, much like TimThumb that generate thum on the fly... but a little complicated...

what do you use or what is the best plugin...

  • What do you mean by 'on the fly'. – Evan Yeung Mar 23 '11 at 19:44
  • example [thumb id="123" sizew="300px"] and that create a version of the photo width 300px – menardmam Mar 23 '11 at 20:09

I made my own, but I only included the basic parameters. Just place this code in your theme's functions.php file. You will need to update the path to timThumb.

// [timThumb id="123" w="300"]
function timThumb_func( $atts ) {
    extract( shortcode_atts( array(
        'id' => '',
        'w' => '',
        'h' => '',
        'q' => '90'
    ), $atts ) );

    $timThumbPath = 'Path/to/timThumb.php';
    $image = wp_get_attachment_image_src( $id );

    if(!$image) {
    } else {
        return '<img src="'.$timThumbPath.'?src='.$image[0].'&w='.$w.'&h='.$h.'&q='.$q.'" />';
add_shortcode( 'timThumb', 'timThumb_func' );

You might want to try this plugin:



I have find this faboulous article... just copy/paste it here for future reference : http://webdeveloperplus.com/wordpress/how-to-use-thumbnails-generated-by-wordpress-in-your-theme/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.