When exporting an asset, its properties can be written inside its binary file. You can specify which properties should be exported with the asset.
To do this, create a template in the admin panel, specifying the matching properties of the asset and the metadata in which they should be saved when exporting. You can create a separate export template for each content type.
For images, the metadata export template is already set and you can edit it.
In the Meta templates subsection of the Content_Export, click ADD META TEMPLATE. In the Content type field on the page that appears, select the value of the content type that you want to configure the export template for. In the Template field, specify the correspondence between the asset properties and the meta tags in which they should be written when exporting.
The correspondence must be written in JSON-like format, where
- the available exiftool metadata tags are used as keys, e.g. "iptc:headline" or "xmp:keywords"
- the properties of the asset are used as values:
- the slug attribute is used to identify the property, e.g. "tags" or "description."
- the value language that should be used can be specified. If no language is specified, the value without a language is used (lang: null).
- conditional operators can be used. For example, you can specify in the template that for the "xmp:description-en" property, the value of the description property in the language en is specified if it is set for the asset, otherwise it remains empty.
- The values are converted into the string type:
- the date is converted into a string type according to ExifTool recommendations. The time zone, if any, is written to the date;
- the boolean values are set to "True" / "False";
- Tag lists are converted into a line that combines all the values of individual tags and is separated by a semicolon with a space ("; ")
- The current delimiter can be overridden,
- Example: vehicles; auto; car.
An example of a metadata export template:
{"xmp:Title": "{title}", "xmp:source": "{source}", "iptc:source": "{source}", "iptc:By-line": "{copyright}", "xmp:Keywords": "{tags}", "xmp:ShotDate": "{create_date}", "xmp:Title-en": "{title_en}", "xmp:Title-fr": "{title_fr} ", "iptc:Headline": "{title_fr} ", "iptc:Keywords": "{tags}", "xmp:Description": "{description_fr}", "xmp:Description-en": "{description_en}", "xmp:Description-fr": "{description_fr}", "iptc:Caption-Abstract": "{description_en}", "iptc:SpecialInstructions": "{instructions}"}
After editing the template, click SAVE. When you export assets, the values of the properties you specify will be written to those asset files.
You can see an example of a template setup for the Image content type.