Why!? All of the code posted by Greg happens on the server side. So not only will the file size will be smaller than the full image when a user downloads it, but the server takes care of resizing; not the browser.
You guys are idiots and need to learn to read. You also need to learn the difference between server-side and client-side technologies.