Using the combined tool set of the AFF Framework will allow you have images automatically resized to fit within dimensions that you specify.
If you want to set up the automatic image resizing functionality from the code generator, simply make a field with a type of "image" or "thumb" and enter a MaxWidth and/or a Maxheight (in number of pixels). The generator will create code to automatically resize an image uploaded for that field so that it does not exceed those dimensions.
If you want to manually change the code to use the image resizing functionality, first verify a few things are in place:
These things should be in place if you used the generator initially.
Now, use the following steps to enable automatic image resizing: