# OPF-093: local link without media type, how to fix it

Source: https://epubcc.com/epubcheck/opf-093/ (updated 2026-11-04)

EPUBCheck OPF-093 is an error message: “The "media-type" attribute is required for linked resources located in the EPUB container.” A link element in the metadata points to a file inside the EPUB but has no media-type attribute. For local resources EPUB requires the media type, so reading apps know what the linked file is.

- Official message (EPUBCheck 5.4.0): The "media-type" attribute is required for linked resources located in the EPUB container
- Default severity: Error

## Typical causes

- A metadata link to a local record or file written without media-type.
- A link copied from an example that pointed to a remote file.
- A tool that writes link elements without attributes beyond href and rel.

## How to fix it

1. Find the link element EPUBCheck points to.
2. Add media-type with the linked file's format, for example media-type="application/xml".
3. Check that the file really exists in the archive at that path.

## When it's not this

If the link is a record or voicing link (local or remote) without media-type, EPUBCheck reports OPF-094.

## Sources

- EPUB 3.3, §5.5.6 The link element: https://www.w3.org/TR/epub-33/#sec-link-elem (read 2026-11-04)

Message text and severity: EPUBCheck (W3C, BSD-3-Clause). Explanation: EpubCC.
