Image Uploader API

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

Post processing of uploaded file

You can do this using the wp_handle_upload hook: http://adambrown.info/p/wp_hooks/hook/wp_handle_upload?version=3.4&file=wp-admin/includes/file.php Create a function and add it to this hook so it runs last, it will be passed an array. The array contains the location of the newly uploaded file: add_filter(‘wp_handle_upload’,’wpse_66775_handle_upload’,1000,1); function wpse_66775_handle_upload($args){ $filename = $args[‘file’]; $type = $args[‘type’]; // test if it’s an XML file and … Read more

PDF file upload issue

You should set your MIME types for your pdf. ‘application/pdf’ and/or ‘application/x-pdf’ sorry for the quick answer, no time to go into detail but this should get you on the way

update_options and unique filenames

Welcome to the lions den So you’re willing to get down into the blazing furnace or the lions den and change the upload path. This is so not a good idea without investigating what is happening behind the scenes. I can’t give you a full write up, as there’s so much involved, like filters, options … Read more

How to keep WP from recompressing Full Size images

Using a filter for jpg_quality will hellp you to set your quality for uplaoded images. add_filter(‘jpeg_quality’, create_function(‘$n’, ‘return 70;’)); In most good implementations of Image Optimization you can find a various usae of ImageOptimization tools such as optimng/jpegtran etc, there a lot of plugins that help you to do that.