Return to Snippet

Revision: 21991
at December 28, 2009 11:24 by mdrisser


Initial Code
function imageresizer( $atts, $content = null ) {
    return '<img src="/timthumb/timthumb.php?src='.$content.'&w=590" alt="" />';
}

add_shortcode('img', 'imageresizer');


// Then add the following syntax to your posts
// [img]http://www.yoursite.com/yourimage.jpg[/img

Initial URL
http://webdesignledger.com/tips/13-useful-code-snippets-for-wordpress-development

Initial Description
From Web Design Ledger "13 Useful Code Snippets for WordPress Development"

Initial Title
Wordpress - Automatically Resize Images

Initial Tags

                                

Initial Language
PHP