Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

3 Answers

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) {
        return
    } else {
        return '<img src="'.$timThumbPath.'?src='.$image[0].'&w='.$w.'&h='.$h.'&q='.$q.'" />';
    }
}
add_shortcode( 'timThumb', 'timThumb_func' );
share|improve this answer
add comment

You might want to try this plugin:

http://austinmatzko.com/wordpress-plugins/filosofo-custom-image-sizes/

share|improve this answer
add comment
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
add comment

Your Answer

 
discard

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.