Posted By

mdrisser on 12/28/09


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

rickfu
BrianCoyDesign
kwameboame


Wordpress - Automatically Resize Images


 / Published in: PHP
 

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

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

  1. function imageresizer( $atts, $content = null ) {
  2. return '<img src="/timthumb/timthumb.php?src='.$content.'&w=590" alt="" />';
  3. }
  4.  
  5. add_shortcode('img', 'imageresizer');
  6.  
  7.  
  8. // Then add the following syntax to your posts
  9. // [img]http://www.yoursite.com/yourimage.jpg[/img

Report this snippet  

You need to login to post a comment.