Skip to content
EPUBCheck · Images, audio and media overlays

EPUBCheck MED-003: img in picture not core type

Updated:

EPUBCheck MED-003 is an error message: “Picture "img" elements must reference core media type resources, but found resource "…" of type "…".” An img inside a picture element points to an image in a format that is not a core media type. Inside picture, the img must always reference a core image type (JPEG, PNG, GIF, WebP or SVG) so every reading app can show it; EPUBCheck names the file and its type.

The official message

Picture "img" elements must reference core media type resources, but found resource "%1$s" of type "%2$s".

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

%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.

Typical causes

  • TIFF, BMP, HEIC or other formats that reading apps are not required to display.
  • A picture element written for the web, with the modern format in img and the fallback in source.

How to fix it

  1. Convert the image to JPEG, PNG, GIF, WebP or SVG and update the src and the manifest media type.
  2. If you want to offer another format, put it in a source element with a type attribute, and keep a core format in the img.
  3. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

When it's not this

If a source element in the picture lacks a type attribute for a foreign format, that is MED_007.

Terms used here

Other MED messages

  • MED-004 Image file header may be corrupted.
  • MED-005 Media Overlay audio reference … to non-standard audio type … found.
  • MED_007 Picture "source" elements must define a "type" attribute when they reference foreign resources; found resource "…" of type "…".
  • MED-008 The time specified in the clipBegin attribute must not be after clipEnd.
  • MED-009 The time specified in the clipBegin attribute must not be the same as clipEnd.
  • MED_010 EPUB Content Documents referenced from a Media Overlay must specify the "media-overlay" attribute.

Sources

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

FAQ

What does EPUBCheck MED-003 mean?

EPUBCheck MED-003 is an error message: “Picture "img" elements must reference core media type resources, but found resource "…" of type "…".” An img inside a picture element points to an image in a format that is not a core media type. Inside picture, the img must always reference a core image type (JPEG, PNG, GIF, WebP or SVG) so every reading app can show it; EPUBCheck names the file and its type.

Is MED-003 an error?

MED-003 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.

PDF to EPUB tools

Every tool uses the same engine and starts with a free 5-page sample.