Skip to content
EPUBCheck · Package and ZIP container

EPUBCheck PKG-025: content file inside META-INF

Updated:

EPUBCheck PKG-025 is an error message: “Publication resource must not be located in the META-INF directory.” A file of the publication (a chapter, image or stylesheet) is stored inside META-INF, a folder reserved for container files such as container.xml. EPUB 3.3 does not allow publication resources there.

The official message

Publication resource must not be located in the META-INF directory

Default severity
Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
EPUBCheck version
5.4.0

Typical causes

  • Content files placed next to container.xml by mistake, or a package document saved inside META-INF.
  • A build script that copies everything into the same folder.

How to fix it

  1. Move the file out of META-INF, into the folder that holds the rest of the content.
  2. Update the manifest and every reference, and the rootfile path in container.xml if you moved the package document.
  3. Rebuild the archive and validate again.

When it's not this

If container.xml itself is missing from META-INF, the error is RSC-002.

Terms used here

Other PKG messages

  • PKG-026 Obfuscated resource must be a Font Core Media Type (was declared as "…" in "…").
  • PKG-023 Validating the EPUB against version 2.0, default validation profile will be used.
  • PKG-027 Could not extract EPUB ZIP content, probably due to file names not encoded in UTF-8.
  • PKG-022 Wrong file extension for image. The image is a "…" file but has the file extension "…".
  • PKG-021 Corrupted image file encountered.
  • PKG-020 OPF file "…" could not be found.

Sources

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

FAQ

What does EPUBCheck PKG-025 mean?

EPUBCheck PKG-025 is an error message: “Publication resource must not be located in the META-INF directory.” A file of the publication (a chapter, image or stylesheet) is stored inside META-INF, a folder reserved for container files such as container.xml. EPUB 3.3 does not allow publication resources there.

Is PKG-025 an error?

PKG-025 is reported as error by default. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.

PDF to EPUB tools

Every tool uses the same engine and starts with a free 5-page sample.