Media Types
Media Types describe the content you can manage in the Media Library. You can configure the metadata you want to manage per Media Type by using the same metadata schema as on Content-Types. The Media Library will provide forms to edit this data. If no Media Type config is provided it falls back to a default config where title, caption, source and description will be taken as metadata.
The feature currently has these limitations:
  • You can only configure 1 mediaType and it has to have the handle image.
  • Only one type is supported: mediaImage
release-2020-12 includes the type mediaVideo
  • You can only configure 1 mediaType for the type mediaVideo and it has to have the handle video.

Example

1
// projectConfig.mediaTypes: [{...}]
2
[{
3
This conversation was marked as resolved by DaRaFF
4
handle: 'image',
5
type: 'mediaImage',
6
info: {
7
label: 'Image',
8
description: 'Media type for images'
9
}
10
metadata: [
11
{
12
handle: 'title',
13
type: 'li-text',
14
config: {
15
required: true,
16
requiredErrorMessage: 'Please provide a title'
17
},
18
ui: {component: 'liMetaTextForm'}
19
},
20
{
21
handle: 'caption',
22
type: 'li-text',
23
ui: {component: 'liMetaTextForm'}
24
},
25
{
26
handle: 'source',
27
type: 'li-text',
28
config: {
29
required: true,
30
requiredErrorMessage: 'Please provide a source'
31
},
32
ui: {component: 'liMetaTextForm'}
33
},
34
{
35
handle: 'note',
36
type: 'li-text',
37
ui: {component: 'liMetaTextareaForm'}
38
},
39
{
40
handle: 'validDateRange',
41
type: 'li-datetime-validity',
42
ui: {component: 'liMetaDateTimeValidityForm'}
43
},
44
{
45
handle: 'googleVision',
46
type: 'li-google-vision'
47
}
48
],
49
exifExtraction: {
50
mappings: [
51
{
52
field: 'Title',
53
metadataPropertyName: 'title'
54
},
55
{
56
field: 'Source',
57
metadataPropertyName: 'source'
58
},
59
{
60
field: 'Description',
61
metadataPropertyName: 'caption'
62
}
63
]
64
},
65
mediaSources: [
66
{
67
handle: 'example',
68
// the plugin name must match with the registered plugin(-handle)
69
plugin: 'examplePlugin',
70
info: {
71
label: 'Example'
72
},
73
// config will be passed to the plugin
74
config: {
75
accessKey: '****'
76
}
77
}
78
],
79
}, {
80
type: 'mediaVideo',
81
handle: 'video',
82
metadata: [
83
{
84
handle: 'title',
85
type: 'li-text',
86
config: {
87
required: true,
88
requiredErrorMessage: 'Please provide a title',
89
maxLength: 200
90
},
91
ui: {component: 'liMetaTextForm'}
92
}
93
]
94
}]
Copied!

Metadata

The metadata follows the rules that also apply to document metadata defined on a content-type. All the same metadata plugins are available. Different from the document metadata, media metadata does not have UI support as of now.

Exif Extraction

This feature is only supported for the mediaImage mediaType.
Whenever in image file is stored in the Media Library, we can extract the IPTC data from the image file and store it in the metadata. You can configure this behavior with the mappings defined in exifExtraction.
We follow https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata and provide a mapping of the field names (and some aliases) to the actual value in IMM or XMP, following the standard with best effort. If the same field is available in IIM and XMP defined fields, we prefer the one in XMP. And example for this is the field Creator (https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#creator). It was first defined in IIM as 2:80 By-line. Later it was renamed in XMP to dc:creator. Both fields have effectively the same meaning: "Contains the name of the photographer, but in cases where the photographer should not be identified the name of a company or organisation may be appropriate." You can extract this field by using either Creator or By-line as the value for field in a mapping, for example:
1
{
2
field: 'By-line',
3
metadataPropertyName: 'creator'
4
}
Copied!
We found inconsistencies with the EXIF data provided in different images. If you have any problems with the extraction of these metadata, please provide us with an example file. We will try to improve our extraction system. Here is a complete list of fields you can use. Please consult https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata for detailed descriptions of the meaning of the single fields.
Field
Aliases (comma separated)
City (legacy)
City, City legacy, cityName
Copyright Notice
rights
Country (legacy)
Country legacy, Country/Primary Location Name
Country Code (legacy)
Country Code
Creator
By-line
Creator’s Contact Info
Creator Contact Info, creatorContactInfo, CreatorContactInfo
Creator’s jobtitle
AuthorsPosition, By-line Title
Credit Line
Credit, Provider
Date Created
DateCreated
Time Created
Description
Caption/Abstract, Caption, description, caption
Description Writer
Writer/Editor, CaptionWriter
Headline
headline
Instructions
instructions
Intellectual Genre
Object Attribute Reference
Job Id
TransmissionReference, Original Transmission Reference
Keywords
subject
Province or State
State, Province/State
Rights Usage Terms
UsageTerms
Scene Code
Scene
Source
source
Subject Code
Subject Reference
Sublocation (legacy)
Location, Sub-location
Title
Object Name, title
Additional Model Information
AddlModelInfo
Artwork or Object in the Image
ArtworkOrObject
Code of Organisation Featured in the Image
OrganisationInImageCode
Copyright Owner
CopyrightOwner
CV-Term About Image
AboutCvTerm
Digital Image GUID
DigImageGUID
Digital Source Type
DigitalSourceType
Embedded Encoded Rights Expression
EmbdEncRightsExpr
Event
Genre
Image Creator
ImageCreator
Image Rating
Rating
Image Region
ImageRegion
Image Registry Entry
RegistryId
Image Supplier
ImageSupplier
Image Supplier Image ID
ImageSupplierImageID
Licensor
Linked Encoded Rights Expression
LinkedEncRightsExpr
Location created
LocationCreated
Location Shown in the Image
LocationShown
Max Avail Height
MaxAvailHeight
Max Avail Width
MaxAvailWidth
Minor Model Age Disclosure
MinorModelAgeDisclosure
Model Age
ModelAge
Model Release Id
ModelReleaseID
Model Release Status
ModelReleaseStatus
Name of Organisation Featured in the Image
OrganisationInImageName
Person Shown in the Image
PersonInImage
Person Shown in the Image with Details
PersonInImageWDetails
PLUS Version
Product Shown in the Image
ProductInImage
Property Release Id
PropertyReleaseID
Property Release Status
PropertyReleaseStatus
Web Statement of Rights
WebStatement
Artwork or Object in the Image structure
ArtworkOrObject

Media Sources

This feature is only supported for the mediaImage mediaType and on the Livingdocs service we currently only support unsplash as an external image provider.
Last modified 9mo ago