27. image

image(source, width, height, smooth|default, fallback_image).

Inserts a user defined, possibly scaled, image in generated content.

source

Required.

URL or path of an image file. Only GIF, JPEG, PNG files will be displayed by XXE but this must not prevent you from using other formats if your backend processor supports them.

A relative URL or path is relative to the location of the document being edited and not to the current working directory.

width, height

Optional.

Dimension of the image in pixels. A length may optionally be followed by a standard CSS unit such as px, in, cm, mm, pt, pc, em, ex.

A negative length is interpreted as a maximum size. This is useful to display images as thumbnails.

auto specifies intrinsic image size.

smooth|default

Optional.

The name of the algorithm used to change the image size: smooth means high-quality/slow and default means low-quality/fast.

fallback_image

Optional.

Specifies which fallback image to use when image specified by first argument cannot be loaded. All forms of image specification supported by XXE (except image()) can be used for this argument: url(), icon(), circle, etc.

Examples (XHTML):

img {
    content: image(attr(src));
}

img {
    content: image(attr(src), -600, -400);
}

img {
    content: image(attr(src), attr(width), attr(height), default, icon(no-image));
}