Image content type (media:image)

Contents

media:image is the built-in content type for bitmap images — JPEG, PNG, WebP, and similar formats. An image content item is created automatically when a supported file is uploaded; XP selects the concrete media type based on the file’s mime type.

super-type

base:media

is-abstract

false

is-final

false

allow-child-content

false

Standard fields

The media:image content type defines a small set of editorial fields:

Field Description

caption

Visible image caption or longer description. Often prefilled from embedded metadata on upload.

altText

Alternative text used for accessibility and fallback rendering.

artist

Photographer or creator credit.

copyright

Rights information.

tags

Free-text tags, searchable alongside other content tags.

The _name (used in the URL path) and displayName (shown in listings) are inherited from the Content interface — see standard content properties.

Extensibility

Like any other content type, media:image can be extended with custom mixins to add application-specific fields — for example, a per-image rights matrix or an internal categorisation taxonomy.

Automatic metadata extraction

When an image is uploaded, Enonic uses Apache Tika to extract embedded metadata following the EXIF, IPTC, and XMP standards. The extracted values populate a set of mixins automatically, making camera settings, GPS coordinates, and file characteristics immediately searchable — see Media indexing for how full-text search works across extracted content.

The tables below list the standard mappings from Tika metadata properties to Enonic fields.

media:image

Editorial fields on the content type that are pre-filled from embedded metadata when present. Editors can override or clear these values.

Field Tika property Description

caption

dc:description

Caption or description. Typically read from IPTC Description or Caption-Abstract.

altText

dc:description

Defaults to the same source as caption.

copyright

dc:rights

Rights information or photographer name.

artist

dc:creator

Creator credit.

media:imageInfo

Basic image characteristics, applied as a mixin.

Field Tika property Description

pixelWidth

tiff:ImageWidth

Image width in pixels.

pixelHeight

tiff:ImageLength

Image height in pixels.

byteSize

Content-Length

File size in bytes.

contentType

Content-Type

MIME type, e.g. image/jpeg.

media:cameraInfo

Camera and exposure settings from EXIF.

Field Tika property Description

make

tiff:Make

Camera manufacturer.

model

tiff:Model

Camera model.

lens

exif:LensModel

Lens model.

iso

exif:IsoSpeedRatings

ISO speed.

focalLength

exif:FocalLength

Focal length in mm.

fNumber

exif:FNumber

Aperture (F-number).

exposureTime

exif:ExposureTime

Shutter speed.

media:gpsInfo

Geolocation extracted from the image’s GPS metadata.

Field Tika property Description

geoPoint

geo:lat, geo:long

Latitude and longitude.

altitude

geo:alt

Altitude in meters.

direction

exif:GPSImgDirection

Direction the camera was facing.

Delivery

Images are served through two different APIs depending on what you need:

  • imageUrl(scale: …​, format: …​, quality: …​) routes through the Image API and returns a transformed variant — scaled, cropped, or re-encoded on the fly. This is what front-ends typically use.

  • mediaUrl routes through the Attachment API and returns the raw, unmodified source attachment — the original uploaded file.

Both fields are generated by Guillotine and can be read in the same query that returns the image’s data — see the example below.

Querying via GraphQL

A typical headless client reads editorial fields, the delivery URL, and a subset of the extracted mixins in a single query:

{
  guillotine {
    get(key: "/photos/stage.jpg") {
      _id
      displayName
      type
      ... on media_Image {
        mediaUrl
        imageUrl(scale: "width(1200)")
        data {
          caption
          altText
          artist
          copyright
          tags
        }
        x {
          media {
            imageInfo {
              pixelWidth
              pixelHeight
              byteSize
              contentType
            }
            cameraInfo {
              make
              model
              iso
              focalLength
              exposureTime
            }
            gpsInfo {
              geoPoint
              altitude
            }
          }
        }
      }
    }
  }
}
Response
{
  "data": {
    "guillotine": {
      "get": {
        "_id": "f3076b5c-ea45-4c8b-8c06-1f87b8d8cdd9",
        "displayName": "Stage",
        "type": "media:image",
        "mediaUrl": "/api/media:attachment/my-project/f3076b5c-...:<fingerprint>/stage.jpg",
        "imageUrl": "/api/media:image/my-project/f3076b5c-...:<fingerprint>/width-1200/stage.jpg",
        "data": {
          "caption": "Opening night.",
          "altText": "Audience seated facing the stage.",
          "artist": "Ana Doe",
          "copyright": "© 2026 Example Productions",
          "tags": ["launch", "event-2026"]
        },
        "x": {
          "media": {
            "imageInfo": {
              "pixelWidth": 4032,
              "pixelHeight": 3024,
              "byteSize": 5218340,
              "contentType": "image/jpeg"
            },
            "cameraInfo": {
              "make": "FUJIFILM",
              "model": "X-T5",
              "iso": 400,
              "focalLength": 35,
              "exposureTime": "1/125"
            },
            "gpsInfo": {
              "geoPoint": "59.911,10.757",
              "altitude": 23.5
            }
          }
        }
      }
    }
  }
}

See also

  • Image API — URL structure, scaling, and format conversion for image delivery.

  • Media indexing — how extracted text and metadata become searchable.

  • Media content types — the full list of built-in media types.


Contents

Contents