I created a blog where some users can upload images through the WordPress dashboard. The site gets bogged down quickly because the original images are so big. Some users don’t have the knowledge to resize the images themselves before uploading them, and I don’t want to have to resize them manually.
Is there any way I can set a maximum width and height for uploaded images? I don’t even want the original to remain on the website. I want the largest version of the image on the website to match the width and height restrictions I set.
add this code in your theme’s functions.php it will replace the original image with the the re-sized version.
Article Source: http://goo.gl/nkszUn
Well why dont you create a new image size?
http://codex.wordpress.org/Function_Reference/add_image_size
And use that image on your templates.
This will work for new image uploads as well as older ones replacing user uploaded large images automatically with your defined Large size from admin panel’s media settings: