<image>
Use the <image>
element to include artwork or images in a DITA
topic.
The <image>
element has an optional @placement
attribute that indicates whether the included graphic or artwork is rendered inline (a button or icon) or on a separate line for a larger image.
There also are attributes that indicate the size to which the included graphic or artwork
is scaled.
An image element specifies an @href
attribute, a @keyref
attribute, or both. When both @keyref
and @href
are
specified, the @href
is used as a fallback when the key reference cannot be
resolved. The image addressed by the @keyref
or @href
is
brought into the main flow of the content as rendered.
To make the intent of the image more accessible for users using screen readers or text-only
readers, authors should include a description of the image content in the <alt>
element.
See appendix for information about this element in OASIS document type shells.
- topic/image
<image href="bike.gif" placement="break">
<alt>Two-wheeled bicycle</alt>
</image>
The following attributes are available on this element: Universal attribute group, outputclass, @keyref
, and the
attributes defined below.
@href
@scope
@scope
attribute identifies the
closeness of the relationship between the current
document and the target resource. Allowable values
are local, peer, external, and -dita-use-conref-target. See The scope attribute for more
information on values.@format
◄@format
attribute identifies the format of the resource being
referenced. See The format attribute for details on supported values.◄@height
@width
@align
@scale
@height
or @width
attribute (or both), the @scale
attribute is ignored.It is an error if the value of this attribute is not an unsigned integer. In this case, the implementation might give an error message and might recover by ignoring this attribute.
@scalefit
@height
,
@width
, or @scale
is specified, those attributes determine the graphic
size, and any setting of @scalefit
is ignored. If none of those attributes are
specified and scalefit="yes"
, then
the image is scaled (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 the prevailing column (or table cell) width - that is, the width a paragraph of text would have if the graphic were a paragraph instead. 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.
@placement
@alt
(DEPRECATED)@alt
attribute is deprecated; use the alt element instead.@longdescref
(DEPRECATED)