I'm building a CMS for a client who is definitely not very computer savvy. They will be uploading a lot of photos and they are scared of "big" words like "optimization" and "photoshop" so they are more likely just going to upload photos straight from their camera's SD card. This is bad, obviously, because those files will be huge.

Is there a way to use PHP to resize and optimize an image during the upload process (or upload, fix, save a copy, then delete the original, etc, if it has to come to that) that can save them disk space and make their website run faster. I don't want them to call me somewhere down the line and yell at me for not giving them enough disk space, because they really do have plenty.

I'm going to be using jQuery on the website and jQuery mobile in the CMS (I'm better with development than with design, so this just speeds up the process for me) -- so I'll probably be using some kind of drag-and-drop file-uploader that can handle multiple files and multiple downloads (not necessarily simultaneous) but all I really need is a good PHP function to fix the photos they upload.

(The client is a tattoo shop, I'm working for free for them because one of them was friends with my mom)

Thanks in advance for any help or advice -- it's greatly appreciated!