# EPUBCheck PKG-022: Wrong file extension for image. The…

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

EPUBCheck PKG-022 is a warning message: “Wrong file extension for image. The image is a "…" file but has the file extension "…".” An image's extension does not match its real format, for example a PNG file named .jpg.

- Official message (EPUBCheck 5.4.0): Wrong file extension for image. The image is a "%1$s" file but has the file extension "%2$s".
- Default severity: Warning

## Typical causes

- Images renamed instead of converted.
- Tools that save in one format but keep the old extension.

## How to fix it

- Either rename the file to the right extension or convert it to the format its name says.
- Make the manifest media type match the real format too (image/png, image/jpeg…).
- After renaming, update every reference to the file: the manifest in the package document, links and image sources in the XHTML, and url() references in the CSS.

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