media_xmp_rows

Flatten extracted XMP trees from medium.xmp into an ordered list of {Path, Value} tuples containing binaries. Paths retain element names, child positions and attributes, including language tags. Namespace declarations are omitted. Unsupported input returns an empty list; malformed nodes are skipped.

Use the filter to display the XMP metadata stored with a medium:

{% for name, value in medium.xmp|media_xmp_rows %}
    <dt>{{ name|escape }}</dt>
    <dd>{{ value|escape|linebreaksbr }}</dd>
{% endfor %}

Both paths and values come from the uploaded file and must be escaped. The filter does not perform access checks; the calling page controls access to the medium and its metadata.

Edit on GitHub