---
title: "Media types"
source: https://dev.pageseeder.com/guide/configuration/media_types.html
description: "Media types in PageSeeder enable storage and extraction of metadata from non-PSML files including Microsoft Office, PDF, and image formats. Metadata can be edited, bulk-processed, and configured using templates."
last_updated: 2026-09-08T13:59:40+10:00
tokens: ~1979
---

# Media types

Media types can be used to:

- Store [metadata](../../reference/glossary/document_metadata.md) about any non-PSML file using all the features of PSML [properties](../../reference/glossary/properties.md).
- Extract, and store as editable properties, metadata from the following binary file types:


  - Microsoft Office (`.docx`, `.xlsx`, `.pptx`).
  - PDF (`.pdf`).
  - Images (`.jpg`, `.jpeg`, `.gif`, `.png`).
- Attach editable properties to [external URLs](../../reference/glossary/url.md).

## Extraction

PageSeeder can extract metadata when uploading files, or by reprocessing existing files through the option on the [document types](psml.md) page.

To preview the raw metadata, on the **document types** page, click the “eye” icon that is visible in the Template column beside the media type.

On the **upload document** dialogue, **developer options** are available, where the metadata and properties from newer versions of a file can overwrite existing metadata. 

Alternatively, the metadata properties can be viewed anywhere the **document properties** are displayed.

Following are the field names available for each file type.

### Microsoft Office

```text

dc-title
dc-description
dc-creator
dc-subject
cp-keywords
cp-category
cp-revision
cp-version
dcterms-created
dcterms-modified
```

### PDF

```text
docinfo-title
docinfo-subject
docinfo-keywords
docinfo-author
docinfo-creator
docinfo-producer
docinfo-creationdate
docinfo-moddate
```

### Images

```text

iptc-keywords
exif-image-description
exif-user-comment
exif-artist
exif-date-time
exif-date-time-orginal
exif-image-width
exif-image-height
exif-x-resolution (dpi)
exif-y-resolution (dpi)
exif-copyright
exif-focal-length (mm)
exif-f-number
exif-iso-speed-ratings
exif-gps-altitude (meters)
exif-gps-altitude-ref
exif-gps-latitude
exif-gps-latitude-ref
exif-gps-longitude
exif-gps-longitude-ref
exif-gps-dest-latitude
exif-gps-dest-latitude-ref
exif-gps-dest-longitude
exif-gps-dest-longitude-ref
```

> **Note:** The following clean-up is done on metadata when they are used in document templates: - `cp-keywords`, `docinfo-keywords`, `iptc-keywords`: - Replace ';' by ','. - Then remove any spaces after or before ','. - Then replace other non-label chars by '\_'. - Then truncate to 250 chars at last comma. - `dc-title`, `docinfo-title`, `exif-image-description`: - Truncate to 250 chars.

## Configuration

The `media-template.psml` controls the processing of the metadata fields for each file type. It is available through the **template configuration** page or [template files](developer_tools.md) page.

![Template configuration – Media types](/content/guide/configuration/../../images/configuration/template_config_media_types_v60000.webp)

Following are the default `media-template.psml` files for different file extensions. They follow the same format as [document templates](psml/psml_document_template.md) except that `@level` on `<document>` must be `metadata`.

The metadata fields are inserted by using `{$meta.[field name]}` for attributes and `<t:value name="meta.[field name]" />` for content.

To change these, on the **template configuration** page, in the template column, click the **override** option for a default media template or click the the **create** or **edit** option for an existing media type. Click the **Create media type...** button to create a new media type. After creating or modifying a media template, all relevant files can be updated using the **Reprocess...** button and choosing either:

- “Add new metadata properties only (preserve existing)”

or

- “Overwrite all metadata and document properties (title, docid, description, labels)”

### .docx, .pptx, .xlsx

```xml

<document xmlns:t="http://pageseeder.com/psml/template"
          level="metadata">
  <documentinfo>
    <uri title="{$meta.dc-title}">
      <description>
        <t:value name="meta.dc-description" />
      </description>
      <labels>
        <t:value name="meta.cp-keywords" />
      </labels>
    </uri>
  </documentinfo>
  <metadata>    
    <properties>
      <property name="author"
                title="Author"
                value="{$meta.dc-creator}" />
    </properties>
  </metadata>
</document>
```

### .pdf

```xml

<document xmlns:t="http://pageseeder.com/psml/template"
          level="metadata">
  <documentinfo>
    <uri title="{$meta.docinfo-title}">
      <description>
        <t:value name="meta.docinfo-subject" />
      </description>
      <labels>
        <t:value name="meta.docinfo-keywords" />
      </labels>
    </uri>
  </documentinfo>
  <metadata>    
    <properties>
      <property name="author"
                title="Author"
                value="{$meta.docinfo-author}" />
    </properties>
  </metadata>
</document>
```

### .gif, .jpg, .png

```xml
<document xmlns:t="http://pageseeder.com/psml/template"
          level="metadata">
  <documentinfo>
    <uri title="{$meta.exif-image-description}">
      <description>
        <t:value name="meta.exif-user-comment" />
      </description>
      <labels>
        <t:value name="meta.iptc-keywords" />
      </labels>
    </uri>
  </documentinfo>
  <metadata>    
    <properties>
      <property name="author"
                title="Author"
                value="{$meta.exif-artist}" />
      <property name="latitude"
                title="Latitude"
                value="{$meta.exif-gps-latitude}
                       {$meta.exif-gps-latitude-ref}" />

      <property name="longitude"
                title="Longitude"
                value="{$meta.exif-gps-longitude}
                       {$meta.exif-gps-longitude-ref}" />
    </properties>
  </metadata>
</document>
```

> **Note:** Metadata processing makes uploads slower. If there is no requirement for metadata, removing references to  `meta.` fields from the media template makes uploads faster. To disable metadata processing altogether, add the following to the `media-template.psml`: ```xml <document level="metadata"> </document> ```

## Editing

Metadata for a file can be edited through the **Metadata** tab on the **Document info & metadata** panel, or the **Publication** tab if the document is part of a [publication](../../reference/glossary/publications.md). Alternatively, the format **Sheet** option, available on the search page supports bulk editing of properties in a spreadsheet-like view (see following example).

![Document info & metadata panel – Metadata](/content/guide/configuration/../../images/guide/document_info_panel_metadata_v60000.webp)

### **Edit sheet**

![Edit sheet – Image metadata](/content/guide/configuration/../../images/guide/edit_sheet_image_metadata_v60000.webp)

The metadata editor behavior is configurable through the `editor-config.xml` for the editor name `PSMLMetadata` using the same options as the [PSML properties editor](psml/psml_properties_editor.md).

To create this file, in the Editing column, click **create** in the row for the media type. Following is an example `editor-config.xml` file.

```xml
<editor-configs>
  <editor-config name="PSMLMetadata">
    <field name="width"
           type="text"
           label="Width"
           pattern="[0-9]" />
    <field name="height"
           type="text"
           label="Height"
           pattern="[0-9]" />
    <field name="hi-res" type="xref" label="Hi-res">
      <xref-config>
        <target filters="pssubtype:image" />
      </xref-config>
    </field>
    <field name="action" type="select" label="Action">
      <value>None</value>
      <value>Zoom</value>
      <value>Fullscreen</value>
    </field>
  </editor-config>
</editor-configs>
```

> **Note:** Further information about PageSeeder support for metadata, and how to process it, is available through the following tutorial: [How to use metadata to substitute lo-res with hi-res images](../../get_started/tutorials/substitute_lo-res_with_hi-res_images.md).

