WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 want to create a widget for my theme that will let me upload an image to WP and crop it to a certain size. Can anyone point me to the codex page or a tutorial on how to a bare bone implementation of it?

share|improve this question

This tutorial explains basic use of WordPress media uploader.

http://wp.tutsplus.com/tutorials/creative-coding/how-to-integrate-the-wordpress-media-uploader-in-theme-and-plugin-options

To add image sizes use

 <?php add_image_size( $name, $width, $height, $crop ); ?> 

Read more on this at Codex

http://codex.wordpress.org/Function_Reference/add_image_size

share|improve this answer
    
Thanks for the quick reply. – Mr A Aug 29 '12 at 17:10

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.