# DocBook to HTML - Images and Media

## Templates

`db2html.imagedata`

  Renders an `imagedata` element into an `img` element

`db2html.imagedata.src`

  Outputs the content of the `src` attribute for an `img` element

`db2html.mediaobject`

  Outputs HTML for a `mediaobject` element

## `db2html.imagedata`

Renders an `imagedata` element into an `img` element

### Parameters

`node`

  The element to render

### Description

This template creates an `img` element in the HTML output. This named template is called not only for `imagedata` elements, but also for `graphic` and `inlinegraphic` elements. Note that `graphic` and `inlinegraphic` are deprecated and should not be used in any newly-written DocBook files. Use `mediaobject` instead.

## `db2html.imagedata.src`

Outputs the content of the `src` attribute for an `img` element

### Parameters

`node`

  The element to render

### Description

This template is called by `db2html.imagedata.src` for the content of the `src` attribute of an `img` element.

## `db2html.mediaobject`

Outputs HTML for a `mediaobject` element

### Parameters

`node`

  The element to render

### Description

This template processes a `mediaobject` element and outputs the appropriate HTML. DocBook allows multiple objects to be listed in a `mediaobject` element. Processing tools are expected to choose the earliest suitable object. Currently, this template only chooses the first suitable `imageobject` element. Support for `videobject` and `audioobject` should be added in future versions, as well as a text-only mode.