Match the report title.
Look for "PKG_021 corrupted image file encountered" or the closest title above. Keep the original EPUBCheck, KDP, or Kindle Previewer wording if it differs.
EPUB error guide
Use this when EPUBCheck reports PKG_021 or says a corrupted image file was encountered. Locate the packaged image before editing OPF or rebuilding the EPUB.
Scan when the message does not name the affected path. The report shows affected paths and repair decisions, not manuscript text.
Fixed-layout, DRM, or source-workflow issue? Check unsupported or review-first EPUB cases.
Match these report titles
Use this guide when
Your message matches "PKG_021 corrupted image file encountered" or one of the report titles above.
Upload if
You have the exported reflowable .epub and need the affected path, file, field, or repair decision before editing.
Handle outside this tool
Use the source tool or publishing workflow for DOCX, PDF, KPF, KCB, fixed-layout, comics, image-first books, DRM, visual design, or KDP listing and approval problems.
Read the scan report
Use the report label, affected file, and repair decision together. A matching title alone is not enough if the file path or EPUB structure points to a different problem.
Look for "PKG_021 corrupted image file encountered" or the closest title above. Keep the original EPUBCheck, KDP, or Kindle Previewer wording if it differs.
Use the Affected area, Source file, Target file, or Problem type rows before editing OPF, nav, XHTML, CSS, or image paths.
Repairable means one clear structural change. Needs review or Not supported means use the named file, source project, or platform step.
Copy these fields from the report instead of rebuilding the fix from memory.
1. Example report output
The report should name the exact image path and whether the bytes can be recognized.
EPUBCheck message
ERROR(PKG-021): Corrupted image file encountered.
Affected file
OEBPS/Images/cover.jpg.
EPUB Fixer report
Image header is unreadable; manifest says image/jpeg.
Do this next
Restore or re-export the original image when the binary is damaged.
Do not do this
Do not change OPF media-type if the image bytes are truly corrupted.
Safe repair is limited to metadata or extension mismatches; corrupted image bytes need source replacement.
2. Next step
Those cases need different next steps.
Scan first
Check whether the file bytes match JPEG, PNG, SVG, or another declared type.
Safe repair
Correct manifest media type or extension when the image is readable and the true format is clear.
Manual review
Restore the original source image or re-export the EPUB.
3. Concrete path example
The scanner should show whether the file can be recognized at all.
EPUBCheck: ERROR(PKG-021): OEBPS/Images/photo.jpg: Corrupted image file encountered. Report: Manifest media-type: image/jpeg Detected file header: unreadable Image bytes: damaged or incomplete Fix decision: manual source asset replacement Next: restore photo.jpg from the source project and export again
If the header is readable as PNG while the file is named .jpg, use the media-type mismatch path instead.
Quick decision
The scanner can identify the affected asset, but it should not invent replacement image content.
Scan first
Find the packaged file and compare binary header, extension, and manifest media type.
Safe fix
Correct metadata or extension only when the image file itself is readable.
Stop
Return to the source image or export tool instead of editing OPF.
Start here
PKG_021 means the image file itself may be unreadable. A manifest edit cannot repair a truly corrupted asset.
The EPUB points to an image file, but the packaged image may be damaged or not actually readable.
It can be repaired only when the image is readable and the problem is a clear media-type or extension mismatch.
Copy the exact image path from the validator message.
It is unsafe when the image bytes are damaged, the source asset is missing, or a replacement image must be chosen.
Common situations
Most corrupted image errors need source asset review, not package guessing.
The file may have been truncated during export or ZIP editing.
Restore the original asset before retrying.
A PNG might be named .jpg or declared as JPEG.
Use the media-type mismatch path if the image is readable.
KDP may reject the EPUB because the packaged cover cannot be decoded.
Replace the cover from the source design file.
A batch image process may have damaged assets.
Re-export from clean images rather than patching one line.
PKG_021: Corrupted image file encountered.
EPUBCheck or a publishing platform tries to read an image in the EPUB and the file cannot be decoded as a valid image.
What it means
The EPUB points to an image file, but the packaged image may be damaged or not actually readable.
The image may be truncated, corrupted, mislabeled, exported incorrectly, or damaged during ZIP edits.
Before you edit
A safe repair is possible only when the issue is metadata or extension mismatch. A damaged binary usually needs the original source image.
Why KDP checks it
The OPF file is the EPUB's map: metadata, file list, reading order, and navigation wiring. KDP and EPUBCheck use it to decide whether the book package is coherent.
EPUBCheck checks EPUB 2 and EPUB 3 files against the official rules and reports package, markup, link, and file-reference problems.
KDP supports EPUB files that meet Kindle Publishing Guidelines and recommends checking the file with Kindle Previewer before upload.
Can this be fixed safely?
It can be repaired only when the image is readable and the problem is a clear media-type or extension mismatch.
It is unsafe when the image bytes are damaged, the source asset is missing, or a replacement image must be chosen.
Before: EPUBCheck cannot decode the packaged image. After: the package is fixed only if the file is readable and mislabeled; otherwise the source image must be restored.
Ready to retry?
Upload the EPUB that produced PKG_021. The report should name the image path and whether the file is unreadable, mismatched, or missing.
Upload EPUB to scanFAQ
Only if the file is actually readable and the issue is a clear label mismatch. Damaged image bytes need the original source image or a new export.
Not unless the scan proves the image bytes are valid and only the manifest label is wrong.
Yes. KDP and Kindle Previewer may reject a package when a required image cannot be read.
No. cover-image is OPF wiring. PKG_021 means the image file itself may be unreadable.