# EPUBCheck PKG-021: Corrupted image file encountered

Source: https://epublab.com/epubcheck/pkg-021/ (updated 2026-11-03)

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

- Official message (EPUBCheck 5.4.0): Corrupted image file encountered.
- Default severity: Error

## 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.

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