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, i.e., the value of the width attribute set in the generated HTML <img> tag. |
height | false | true | java.lang.String | A natural number specifying the target height, i.e., the value of the height attribute set in the generated HTML <img> tag. |
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. The following values are supported: - 0 (default)
- Scale to exact target size with background padding:
The image is scaled (enlarged or shrinked) to fit completely into the given target size (height/width) without changing aspect ratio. If attributes height and width are both specified, potentially arising space is filled up in the color defined via the attribute scaleColor . If neither height or width are specified the image is shown in its original size. - 1
- Thumbnail generation mode
Works like mode 0, but images are never enlarged. - 2
- Scale to exact target size with cropping
The image is scaled (enlarged or shrinked) to fill the complete target area and match height or width exactly. The aspect ratio is not changed. Overlapping parts of the image are cropped. - 3
- Scale and keep image proportions, target size variable
The image is scaled (enlarged or shrinked) to fit the target size. Aspect ratio is kept intact. The scaled image will not be padded or cropped, so target size is likely not the exact requested size. Hence, if you use this option you may also want to set noDim or partialTag to true . Otherwise, the browser will scale the image again. - 4
- Scale to the exact target size ignoring the aspect ratio.
If width and height are given both, the image is scaled exactly to that sizes. If at least one of the sizes is not explicitely specified, the aspect ratio is kept. - 5
- Deprecated. Not supported anymore. Behaves similar to 1.
|
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. |
partialTag | false | true | java.lang.String | Specify if only parameters for the HTML <img> tag should be generated, or the whole tag. The following values are supported: - false (default)
- Generate the whole HTML
<img> tag. - true
- Generate only the parameters specified via
<cms:img> . These are at least src , width , height . |
noDim | false | true | java.lang.String | Controls if the attributes width and height are created. The following values are supported: - false (default)
- Attributes
width and height are created. - true
- Attributes
width and height are not created. |
alt | false | true | java.lang.String | Attribute is set unchanged for the generated (partial) tag. |
align | false | true | java.lang.String | Attribute is set unchanged for the generated (partial) tag. |
border | false | true | java.lang.String | Attribute is set unchanged for the generated (partial) tag. |
cssclass | false | true | java.lang.String | The value is set as the value of the class attribute in the generated (partial) tag. |
hspace | false | true | java.lang.String | Attribute is set unchanged for the generated (partial) tag. |
vspace | false | true | java.lang.String | Attribute is set unchanged for the generated (partial) tag. |
id | false | true | java.lang.String | Attribute is set unchanged for the generated (partial) tag. |
longdesc | false | true | java.lang.String | Attribute is set unchanged for the generated (partial) tag. |
name | false | true | java.lang.String | Attribute is set unchanged for the generated (partial) tag. |
style | false | true | java.lang.String | Attribute is set unchanged for the generated (partial) tag. |
title | false | true | java.lang.String | Attribute is set unchanged for the generated (partial) tag. |
usemap | false | true | java.lang.String | Attribute is set unchanged for the generated (partial) tag. |