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
- Move the file out of META-INF, into the folder that holds the rest of the content.
- Update the manifest and every reference, and the rootfile path in container.xml if you moved the package document.
- 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-026Obfuscated resource must be a Font Core Media Type (was declared as "…" in "…").PKG-023Validating the EPUB against version 2.0, default validation profile will be used.PKG-027Could not extract EPUB ZIP content, probably due to file names not encoded in UTF-8.PKG-022Wrong file extension for image. The image is a "…" file but has the file extension "…".PKG-021Corrupted image file encountered.PKG-020OPF file "…" could not be found.
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.