Skip to content
EPUBCheck · Package and ZIP container

PKG-021

Updated:

EPUBCheck PKG-021 is an error message: “Corrupted image file encountered.” An image file inside the EPUB is damaged and cannot be decoded.

The official message

Corrupted image file encountered.

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

  • An image truncated during a copy or download.
  • A file with an image extension whose content is something else, such as an HTML error page saved as .jpg.

How to fix it

  • Export the image again from its source, replace the file and keep the same name, or update every reference to it.

Terms used here

Other PKG messages

  • PKG-022 Wrong file extension for image. The image is a "…" file but has the file extension "…".
  • PKG-024 Uncommon EPUB file extension.
  • PKG-017 Uncommon EPUB file extension.
  • PKG-025 Publication resource must not be located in the META-INF directory
  • PKG-016 Use only lowercase characters for the EPUB file extension for maximum compatibility.
  • PKG-026 Obfuscated resource must be a Font Core Media Type (was declared as "…" in "…").

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

FAQ

What does EPUBCheck PKG-021 mean?

EPUBCheck PKG-021 is an error message: “Corrupted image file encountered.” An image file inside the EPUB is damaged and cannot be decoded.

Is PKG-021 an error?

PKG-021 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.