Neptune 1.0 Beta 3 Documentation: Automatically Resize Uploaded Images

Neptune Information

Download from RIA Forge

Automatically Resize Uploaded Images

Using the combined tool set of the AFF Framework will allow you have images automatically resized to fit within dimensions that you specify.

Using the Code Generator

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:

  1. Go to the "xml" method of the component and field for the image or thumb field to which you want to add automatic resizing.
  2. Add MaxWidth and/or MaxHeight attributes to the field element (using an integer for the number of pixels).
  3. Refresh your component (browse with ?refresh=YourComponentName).