You can set Cartella to perform size conversions on uploaded images, automatically.
The dimensions of the resulting image(s) are set in pixels within the
<ImageAutoConversions>
node.
To configure image conversions:
- Navigate to [Site_Root].
- Open Cartella.config in a text editor.
- Find the
<ImageAutoConversions>
section of
Cartella.config, which contains a set of
<add>
tags.<ImageAutoConversions>
<clear/>
<add targetMemberName="Thumbnail" width="75" height="75" allowCropping="true"/>
<add targetMemberName="MainImage" width="640"/>
</ImageAutoConversions>
Note
The Thumbnail and MainImage values of
@targetMemberName
, which are populated by default, aid
in the display of gallery contents.
- Following the syntax of the default
<add>
elements,
create a custom <add>
element that meets your needs. Each
custom <add>
can contain these attributes:Element | Description |
---|
@targetMemberName | Name of the target member to convert to. |
@width | Width of the target member image. |
@height | Height of target member image. If omitted, use calculated height
based on aspect ratio of the image. |
@allowCropping | If set to true, will crop the image to given width and
height. Height must be specified if set to true. |
@dpi | The dots-per-inch to down sample to. Default value is
72. |
@preserveAspectRatio | Maintains the width-to-height ratio of the image. If set to
true the width-to-height ratio is retained; whereas, if
false, this ratio is not retained when image is edited. |
Note
Each additional image target creates a cropped version of the
uploaded image. The host file system store each image version.
- Save Cartella.config.
Next Steps: Recycle the Cartella site application pool in IIS in order for
your changes to take effect, immediately.