I am tring to upload image in wordpress by utilizing some function ..

I discovered the best way to upload images but you will find one problem ..

once the user upload his image , wordpress create several image diffrent dimensions, this can be a problem because I would like one image only ..

this really is wordpress-conent/uploads/2010/10 folder .. consider the picture (this really is one picture but wordpress create same picture but diffrent dimensions) .

alt text

this really is my code

<?php /*
Template Name: Uploading Page


<?php get_header();
?><div class="container_12">
    <div id="content">
    <form id="file-form" enctype="multipart/form-data" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="POST">
    <p id="async-upload-wrap">
    <label for="async-upload">upload</label>
    <input type="file" id="async-upload" name="async-upload"> <input type="submit" value="Upload" name="html-upload">

    <input type="hidden" name="post_id" id="post_id" value="<?php echo '212';?>" />
    <?php wp_nonce_field('client-file-upload'); ?>
    <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />

    <input type="submit" value="Save all changes" name="save" style="display: none;">

if ( isset( $_POST['html-upload'] ) && !empty( $_FILES ) ) {
    require_once(ABSPATH . 'wp-admin/includes/admin.php');
    $id = media_handle_upload('async-upload', 1199); //post id of Client Files page
    if ( is_wp_error($id) ) {
        $errors['upload_error'] = $id;
        $id = false;

    if ($errors) {
        echo "<p>There was an error uploading your file.</p>";
    } else {
        echo "<p>Your file has been uploaded.</p>";


enter code here

how makes it one picture?

If only you realize me ^_* because my language >_<

Possibly you will find something of relevance within the good examples given here concerning the media uploader.


You may even want posting your question towards the WordPress Stack Exchange.