Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am looking for the regular images that get uploaded from the media uploader. I want to put in an image resize script instead of using WordPress to manage the images. The main reason being is that I don't want 3 images created every time I upload an image. I want just the size that is chosen from the media uploader. I did some reading on this site and figured out how to get the sizes. Now I need to know if there is a hook that can grab the image? I have only ever worked with the thumbnail. Where are the regular images called from that get inserted into the body of the post?

share|improve this question
1  
I've seen, and personally answered, lots of Q&As dealing with this here in WordPress Development. Search for wp_handle_upload_overrides, intermediate_image_sizes_advanced, wp_handle_upload_prefilter, wp_generate_attachment_metadata. –  brasofilo Apr 16 '13 at 13:38
add comment

1 Answer

Why not set your own image sizes from within your theme in functions.php?

add_image_size( 'some-image-size-name', 500, 300 );

Then you can call that size you want from your template.

<?php echo get_the_post_thumbnail( $post_id, $size, $attr ); ?> 

Links

Add image size: http://codex.wordpress.org/Function_Reference/add_image_size

get post thumbnail: http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail

share|improve this answer
    
because that is the opposite of what I am trying to do. I am adding a custom script to my site to handle the images. I am going to use WordPress built in features with the script. If you add image size then it will add those sizes plus all the others. I am also not talking about the post thumbnail in this question –  Jamie Apr 17 '13 at 22:52
    
Oh, ok I see now. –  ckpepper02 Apr 17 '13 at 23:14
add comment

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.