WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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...

share|improve this question
What do you mean by 'on the fly'. – imHavoc 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' );
share|improve this answer

You might want to try this plugin:


share|improve this answer
up vote 0 down vote accepted

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/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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