<image>
An image is a reference to artwork that is stored outside of the content.
Rendering expectations
The referenced image typically is rendered in the main flow of the content.
@height
and
@width
attributes. The following expectations apply:- If a height value is specified and no width value is specified, processors SHOULD scale the width by the same factor as the height.
- If a width value is specified and no height value is specified, processors SHOULD scale the height by the same factor as the width.
- If both a height value and width value are specified, implementations MAY ignore one of the two values when they are unable to scale to each direction using different factors.
Content model
<alt>
?,
<longdescref>
?
- Optional
<alt>
- Optional
<longdescref>
Attributes
The following attributes are available on this element: universal
attributes, @format
, @href
, @keyref
, @scope
, and the attributes
defined below.
@align
- Controls the horizontal alignment of an image when
@placement
is specified as break. Common values include left, right, and center. @height
- Specifies the vertical dimension for the resulting display. The value of this attribute is a real number expressed in decimal notation, optionally followed by a unit of measure. The following units of measurement are supported: cm, em, in, mm, pc, pt, and px (centimeters, ems, inches, millimeters, picas, points, and pixels, respectively). The default unit is px (pixels). Possible values include:5, 5in, and 10.5cm.
@placement
- Indicates whether an image is displayed inline or on a separate line. The default value is inline. Allowable values are inline, break, and "-dita-use-conref-target".
@scale
- Specifies a percentage as an unsigned integer by which to
scale the image in the absence of any specified image height or
width; a value of 100 implies that the image should be
presented at its intrinsic size. If a value has been specified
for the
@height
or@width
attribute (or both), the@scale
attribute is ignored. @scalefit
-
Specifies whether an image is scaled up or down to fit within available space. The allowable values are yes, no, and "-dita-use-conref-target". If
@height
,@width
, or@scale
is specified, those attributes determine the graphic size, and the@scalefit
attribute is ignored. If none of those attributes are specified andscalefit="yes"
, then the image is scaled by the same factor in both dimensions, so that the graphic will just fit within the available height or width, whichever is more constraining.The available width would be that of the prevailing column or table cell, that is, the width a paragraph of text would have if the graphic were a paragraph instead od text. The available height is implementation dependent, but if feasible, it is suggested to be the page or table cell height or some other reasonable value.
@width
- Specifies the horizontal dimension for the resulting display. The value of this attribute is a real number expressed in decimal notation, optionally followed by a unit of measure. The following units of measurement are supported: cm, em, in, mm, pc, pt, and px (centimeters, ems, inches, millimeters, picas, points, and pixels, respectively). The default unit is px (pixels). Possible values include:5, 5in, and 10.5cm.
The following attributes are available on this element: universal attributes and the attributes defined below.
@align
- Controls the horizontal alignment of an image when
@placement
is specified as break. Common values include left, right, and center. @format
(link-relationship attributes)- Specifies the format of the resource that is referenced. See The format attribute for detailed information on supported values and processing implications.
@height
- Specifies the vertical dimension for the resulting display. The value of this attribute is a real number expressed in decimal notation, optionally followed by a unit of measure. The following units of measurement are supported: cm, em, in, mm, pc, pt, and px (centimeters, ems, inches, millimeters, picas, points, and pixels, respectively). The default unit is px (pixels). Possible values include:5, 5in, and 10.5cm.
@href
(link-relationship attributes)- Specifies a reference to a resource. See The href attribute for detailed information on supported values and processing implications.
@keyref
- Specifies a key name that acts as a redirectable reference based on a key definition within a map. See The keyref attribute for information on using this attribute.
@placement
- Indicates whether an image is displayed inline or on a separate line. The default value is inline. Allowable values are inline, break, and "-dita-use-conref-target".
@scale
- Specifies a percentage as an unsigned integer by which to
scale the image in the absence of any specified image height or
width; a value of 100 implies that the image should be
presented at its intrinsic size. If a value has been specified
for the
@height
or@width
attribute (or both), the@scale
attribute is ignored. @scalefit
-
Specifies whether an image is scaled up or down to fit within available space. The allowable values are yes, no, and "-dita-use-conref-target". If
@height
,@width
, or@scale
is specified, those attributes determine the graphic size, and the@scalefit
attribute is ignored. If none of those attributes are specified andscalefit="yes"
, then the image is scaled by the same factor in both dimensions, so that the graphic will just fit within the available height or width, whichever is more constraining.The available width would be that of the prevailing column or table cell, that is, the width a paragraph of text would have if the graphic were a paragraph instead od text. The available height is implementation dependent, but if feasible, it is suggested to be the page or table cell height or some other reasonable value.
@scope
(link-relationship attributes)- Specifies the closeness of the relationship between the
current document and the referenced resource. The following values are valid:
local, peer,
external, and
-dita-use-conref-target.
See The scope attribute for detailed information on supported values and processing implications.
@width
- Specifies the horizontal dimension for the resulting display. The value of this attribute is a real number expressed in decimal notation, optionally followed by a unit of measure. The following units of measurement are supported: cm, em, in, mm, pc, pt, and px (centimeters, ems, inches, millimeters, picas, points, and pixels, respectively). The default unit is px (pixels). Possible values include:5, 5in, and 10.5cm.
Example
This section is non-normative.
The following code sample shows how an image is referenced. The @placement
attribute is set to "break"; this ensures that the image is not rendered inline.
<image href="bike.gif" placement="break">
<alt>Two-wheeled bicycle</alt>
</image>