A complete reference of PageSeeder's markup language PSML



The <image> element provides a placeholder for displaying an image.

The actual image to display must be a file which media type is of that "image", that is starting with "image/".

In PageSeeder, the image file must be a PageSeeder document and the <image> element also expresses a relationship between the PSML document and the  referenced image file enabling two-way tracking of both files. In effect, an image is similar to a transclusion of an image document.


Requires at least one of the following attributes: @src, @docid, @uriid.

Usage context

Element category
PSML levelportable
Permitted contentnone (empty element)
Permitted parent
HTML equivalent<img>
OpenXML equivalent
PSStandard equivalent<graphic>


This element includes the following attributes

srcxs:stringnoURL for image.
dociddocument-idnoDocument ID of the referenced image if any
uriidxs:longnoThe URI ID of the image being referenced
altxs:stringnoAlternative description for non-visual readers.
heightxs:positiveIntegernoHeight in pixels.
unresolvedbooleannoA boolean to flag images which reference could not be resolved
widthxs:positiveIntegernoWidth in pixels.

The @unresolved attribute is informational and ignored by upload.


Alternative description for non-visual readers.


The height of the image in pixels. If this attribute is omitted, the image should rendered using the default behavior of the layout engine.


The URL for the image in PageSeeder. This URL can be:

  • relative (e.g. images/mypic.png or ../common/anotherpic.jpg)
  • absolute (e.g. /ps/myproject/mygroup/images/diagram.png)
  • permalink (e.g. /ps/uri/123.png)

It overrides the docid and uriid on upload.

In order to create permalinks, the URL should refer to the URI ID of the image (/ps/uri/[uri id].[extension]). PageSeeder allows the URI ID in the URL to be suffixed by an extension in order to provide a clue to external applications about the media type of the image (this is required by Microsoft Office).


On export the image src is always relative.


An image src must not point to an external location, so it should not start with either "http://" or "https://". It must always be URL encoded.


If the referenced image has a document id, it will be included.

It overrides the uriid on upload.


The URI ID of the image being referenced.

Ignored if uploading to different PageSeeder server.


If "true" the target document doesn't exist. INFORMATIONAL - ignored by upload.


The width in pixels. If this attribute is omitted, the image should be rendered using the default behavior of the layout engine.



Image using a permalink.

<image src="/ps/uri/23.png" uriid="23" alt="Example"/>


When an image uses a permalink the URI ID should match the ID in the @src attribute.


Image using a PageSeeder path instead of a permalink. In PageSeeder the URI ID is used to determine what the actual image is. PageSeeder ensure that the path corresponds to the path of the image.

<image src="/ps/doc/examples/images/sample.jpg" uriid="186034"
     width="600" height="400" alt="A sample image"/>


XML Schema

<xs:element name="image">
      <xs:attribute name="src" type="xs:string" use="required"/>
      <xs:attribute name="width" type="xs:positiveInteger"/>
      <xs:attribute name="height" type="xs:positiveInteger"/>
      <xs:attribute name="alt" type="xs:string"/>
      <xs:attribute name="uriid" type="xs:long"/>

Relax Schema

element image {
   attribute src { text},
   attribute uriid { xs:long }?,
   attribute width { xs:positiveInteger }?,
   attribute height { xs:positiveInteger }?,
   attribute alt { text }?,


This element was introduced in the first draft of PSML and is well supported from PageSeeder 5.1.

Up to PageSeeder 5.7,  much like HTML, <image> is a declarative element, in other words, it defines a placeholder for the image referenced by a URL to be displayed. 

From PageSeeder 5.8, the <image> element also expresses a relationship between an image file and the PSML document that contains it. Like other type of two-way cross-references, it is possible to track the use of images and ensure that the <image> element references an actual image.

See also

Created on , last edited on