Attributes |
Name | Required | Request-time | Type | Description |
src | false | true | java.lang.String | URI of the image's source file. Note: The uri will be adjusted by OpenCms automatically, so do not use <cms:link> . |
width | false | true | java.lang.String | A natural number specifying the target width |
height | false | true | java.lang.String | A natural number specifying the target height |
maxWidth | false | true | java.lang.String | Deprecated A natural number specifying the maximal width of an image scaled with scaleType="5" . For other scale types the attribute is ignored. |
maxHeight | false | true | java.lang.String | Deprecated A natural number specifying the maximal height of an image scaled with scaleType="5" . For other scale types the attribute is ignored. |
scaleType | false | true | java.lang.String | Set the scale type used for the image. Possible values are: - 0 (default): Scale to exact target size with background padding
- enlarge image to fit in target size (if required)
- reduce image to fit in target size (if required)
- keep image aspect ratio / proportions intact
- fill up with bgcolor to reach exact target size
- fit full image inside target size (only applies if reduced)
- 1: Thumbnail generation mode (like 0 but no image enlargement)
- don't enlarge image
- reduce image to fit in target size (if required)
- keep image aspect ratio / proportions intact
- fill up with bgcolor to reach exact target size
- fit full image inside target size (only applies if reduced)
- 2: Scale to exact target size, crop what does not fit
- enlarge image to fit in target size (if required)
- reduce image to fit in target size (if required)
- keep image aspect ratio / proportions intact
- fit full image inside target size (crop what does not fit)
- 3: Scale and keep image proportions, target size variable
- enlarge image to fit in target size (if required)
- reduce image to fit in target size (if required)
- keep image aspect ratio / proportions intact
- scaled image will not be padded or cropped, so target size is likely not the exact requested size
- 4: Don't keep image proportions, use exact target size
- enlarge image to fit in target size (if required)
- reduce image to fit in target size (if required)
- don't keep image aspect ratio / proportions intact
- the image will be scaled exactly to the given target size and likely will be loose proportions
5: Scale and keep image proportions without enlargement, target size variable with optional max width and height - dont't enlarge image
- reduce image to fit in target size (if required)
- keep image aspect ratio / proportions intact
- best fit into target width / height _OR_ width / maxHeight _OR_ maxWidth / height
- scaled image will not be padded or cropped, so target size is likely not the exact requested size
|
scalePosition | false | true | java.lang.String | Specify how the original image is placed if cropped or padded. The following values are supported: - 0 (default)
- center
- 1
- lower left
- 2
- lower right
- 3
- lower middle
- 4
- center left
- 5
- center right
- 6
- upper middle
- 7
- upper left
- 8
- upper right
|
scaleFilter | false | true | java.lang.String | Specify filters applied to the image (and also to a possibly present padding). The following values can be given as colon (":") separated list: - shadow
- Adds a shadow effect to the image.
- grayscale
- Renders the image in grayscale.
|
scaleQuality | false | true | java.lang.String | An non-negative integer specifying the scale quality in percent. Allowed are values between 0 and 100, where 0 is a special value to use the default quality. The value has only influence on image formats that support a quality setting, e.g. JPEG. Default: 0. |
scaleColor | false | true | java.lang.String | The color used as backgroud if padding is neccessary. The following values are supported: - transparent (default)
- Transparent background, if supported by the image type, e.g. for PNG. If transparent background is not supported, e.g. by JPEG, the value defaults to white (FFFFFF).
- 000000 - FFFFFF
- Hexadecimal RGB color code.
|
scaleRendermode | false | true | java.lang.String | Set the image processing mode. The following values are supported: - 0 (default)
- Quality. Best possible image processing. Might be slow.
- 1
- Medium. Use default JVM settings. Almost as slow as quality mode. Not recommended.
- 2
- Speed. Fast image processing. But quality might be not as good as in quality mode.
The setting is recommended for thumbnail generation. |
hiDpiVariants | false | true | java.lang.String | Optional comma separated list of hi DPI veariants to produce, e.g. "1.3x,1.5x,2x,3x". If you only need the "retina" variant, use "2x". Hi DPI variants may be found in the resulting image bean in the map "hiDpiImages". |
var | false | true | java.lang.String | The name of the variable used to store the resulting image bean |