Skip to content
EPUBCheck · Package document (OPF)

OPF-013

Updated:

EPUBCheck OPF-013 is a warning message: “Resource "…" is declared with MIME type "…" in content, but has MIME type "…" in the package document.” A content document declares one media type for a resource (in a type attribute) and the manifest declares another.

The official message

Resource "%1$s" is declared with MIME type "%2$s" in content, but has MIME type "%3$s" in the package document.

Default severity
Warning. The EPUB is still valid, but something is likely to cause problems in some reading apps. EPUBCheck exits with 0 unless you pass --failonwarnings.
EPUBCheck version
5.4.0

%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.

Typical causes

  • An object, embed, link or source element whose type attribute disagrees with the manifest item.

How to fix it

  • Make the type attribute and the manifest media-type the same, using the file's real format.

Terms used here

Other OPF messages

  • OPF-012 Item property "…" is not defined for media type "…".
  • OPF-014 The property "…" should be declared in the OPF file.
  • OPF-011 itemref can’t have both page-spread-right and page-spread-left properties.
  • OPF-015 The property "…" should not be declared in the OPF file.
  • OPF-016 The element "rootfile" is missing its required attribute "full-path".
  • OPF-017 The attribute "full-path" on element "rootfile" must not be empty.

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EPUBLab.

FAQ

What does EPUBCheck OPF-013 mean?

EPUBCheck OPF-013 is a warning message: “Resource "…" is declared with MIME type "…" in content, but has MIME type "…" in the package document.” A content document declares one media type for a resource (in a type attribute) and the manifest declares another.

Is OPF-013 an error?

OPF-013 is reported as warning by default. The EPUB is still valid, but something is likely to cause problems in some reading apps. EPUBCheck exits with 0 unless you pass --failonwarnings.