Image

Key point: To display an image inline in the document content

The <image> element defines how an image file is displayed within the document The actual image source to display is an image file stored in PageSeeder.

Image source reference

An image actually defines a relationship between the PSML document and the referenced image file enabling two-way tracking of both files. It is similar to a transclusion of an image document.

This feature lets you move and update the document or the image without affecting how the image is displayed. 

Use the document references panel to see:

  • The list of image files referenced in a document in the Images tab
  • The list of documents that reference an image file in the Incoming tab

For developers

Within PageSeeder, the connection between the source document and the image source is maintained using the URI ID, allowing the path of either to change. In that case, the src attribute reflects the current path of the source image.

When you upload documents and images, the path specified in the src is used to locate the image and establish the connection, but if this fails the URI ID is used.

Other attributes

Title

The title of the image is optional can be used as a caption or alternative text in the document. It is often prefilled with the title of the image file in the user interface.

Dimensions

The image can specify the height and/or width of the image in the document. When inserting or editing images with the image dialog, you can set either dimension directly or use the scale.

Labels

Image labels let you provide additional semantics for the image.

Adding images

You can insert or upload an image in a document using the image dialog; follow the steps in how to insert an image in a document.

All image source files must be stored as files in PageSeeder. This can be done while you are inserting the image using the upload option in the image dialog or if you drag and drop the image into the editor.

Image files can also be uploaded separately before editing, in that case, they are available for searching in the image dialog.

For developers

In PSML, images are represented using the <image> element.

For more information, see the image element in the PSML reference on the PageSeeder developer’s website.